org.apache.myfaces.test.utils
Class HtmlRenderedAttr

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

public class HtmlRenderedAttr
extends java.lang.Object


Field Summary
static int RENDERED_LESS_TIMES_THAN_EXPECTED
           
static int RENDERED_MORE_TIMES_THAN_EXPECTED
           
 
Constructor Summary
HtmlRenderedAttr(java.lang.String name)
           
HtmlRenderedAttr(java.lang.String name, int expectedOccurences)
           
HtmlRenderedAttr(java.lang.String name, java.lang.String value, java.lang.String expectedHtml)
          Represents an attribute of a component that is expected to be rendered into html
HtmlRenderedAttr(java.lang.String name, java.lang.String value, java.lang.String expectedHtml, int occurances)
           
 
Method Summary
 int getActualOccurrences()
           
 int getErrorCode()
           
 java.lang.String getExpectedHtml()
           
 int getExpectedOccurrences()
           
 java.lang.String getName()
           
 java.lang.String getValue()
           
 void increaseActualOccurrences()
           
 boolean isRenderSuccessful()
          This returns the result of the rendering of the attribute.
 void setErrorCode(int errorCode)
           
 void setExpectedHtml(java.lang.String expectedHtml)
           
 void setName(java.lang.String name)
           
 void setRenderSuccessful(boolean renderSuccessful)
           
 void setValue(java.lang.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(java.lang.String name)

HtmlRenderedAttr

public HtmlRenderedAttr(java.lang.String name,
                        int expectedOccurences)

HtmlRenderedAttr

public HtmlRenderedAttr(java.lang.String name,
                        java.lang.String value,
                        java.lang.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(java.lang.String name,
                        java.lang.String value,
                        java.lang.String expectedHtml,
                        int occurances)
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getValue

public java.lang.String getValue()

setValue

public void setValue(java.lang.String value)

getExpectedHtml

public java.lang.String getExpectedHtml()

setExpectedHtml

public void setExpectedHtml(java.lang.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 © 2011 The Apache Software Foundation. All Rights Reserved.