org.apache.myfaces.test.utils
Class HtmlRenderedAttr

java.lang.Object
  extended by org.apache.myfaces.test.utils.HtmlRenderedAttr

public class HtmlRenderedAttr
extends Object


Field Summary
static int RENDERED_LESS_TIMES_THAN_EXPECTED
           
static int RENDERED_MORE_TIMES_THAN_EXPECTED
           
 
Constructor Summary
HtmlRenderedAttr(String name)
           
HtmlRenderedAttr(String name, int expectedOccurences)
           
HtmlRenderedAttr(String name, String value, String expectedHtml)
          Represents an attribute of a component that is expected to be rendered into html
HtmlRenderedAttr(String name, String value, String expectedHtml, int occurances)
           
 
Method Summary
 int getActualOccurrences()
           
 int getErrorCode()
           
 String getExpectedHtml()
           
 int getExpectedOccurrences()
           
 String getName()
           
 String getValue()
           
 void increaseActualOccurrences()
           
 boolean isRenderSuccessful()
          This returns the result of the rendering of the attribute.
 void setErrorCode(int errorCode)
           
 void setExpectedHtml(String expectedHtml)
           
 void setName(String name)
           
 void setRenderSuccessful(boolean renderSuccessful)
           
 void setValue(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RENDERED_MORE_TIMES_THAN_EXPECTED

public static final int RENDERED_MORE_TIMES_THAN_EXPECTED
See Also:
Constant Field Values

RENDERED_LESS_TIMES_THAN_EXPECTED

public static final int RENDERED_LESS_TIMES_THAN_EXPECTED
See Also:
Constant Field Values
Constructor Detail

HtmlRenderedAttr

public HtmlRenderedAttr(String name)

HtmlRenderedAttr

public HtmlRenderedAttr(String name,
                        int expectedOccurences)

HtmlRenderedAttr

public HtmlRenderedAttr(String name,
                        String value,
                        String expectedHtml)
Represents an attribute of a component that is expected to be rendered into html

Parameters:
name - The name of the attribute.
value - The value of the attribute.
expectedHtml - The expected html output for this attribute. E.g. name="value".

HtmlRenderedAttr

public HtmlRenderedAttr(String name,
                        String value,
                        String expectedHtml,
                        int occurances)
Method Detail

getName

public String getName()

setName

public void setName(String name)

getValue

public String getValue()

setValue

public void setValue(String value)

getExpectedHtml

public String getExpectedHtml()

setExpectedHtml

public void setExpectedHtml(String expectedHtml)

isRenderSuccessful

public boolean isRenderSuccessful()
This returns the result of the rendering of the attribute.

Returns:
True if the rendered html output of this attribute is the same as expectedHtml. False if either the attribute was not rendered, it was rendered multiple times, or the rendered html is different from expectedHtml.

setRenderSuccessful

public void setRenderSuccessful(boolean renderSuccessful)

getErrorCode

public int getErrorCode()

setErrorCode

public void setErrorCode(int errorCode)

increaseActualOccurrences

public void increaseActualOccurrences()

getActualOccurrences

public int getActualOccurrences()

getExpectedOccurrences

public int getExpectedOccurrences()


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.