|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.test.utils.HtmlCheckAttributesUtil
public class HtmlCheckAttributesUtil
This is a utility class used in unit test cases to check if a component's attributes are rendered properly.
| Constructor Summary | |
|---|---|
HtmlCheckAttributesUtil()
|
|
| Method Summary | |
|---|---|
static void |
checkRenderedAttributes(javax.faces.component.UIComponent component,
javax.faces.context.FacesContext context,
org.apache.shale.test.mock.MockResponseWriter writer,
HtmlRenderedAttr[] attrs)
This method adds all attributes from attrs into the component. |
static java.lang.String |
constructErrorMessage(HtmlRenderedAttr[] attrs,
java.lang.String actual)
Constructs an error message string detailing which attributes were not rendered and which attributes were rendered more than once. |
static HtmlRenderedAttr[] |
generateAttrsNotRenderedForReadOnly()
|
static HtmlRenderedAttr[] |
generateBasicAttrs()
|
static HtmlRenderedAttr[] |
generateBasicReadOnlyAttrs()
|
static boolean |
hasFailedAttrRender(HtmlRenderedAttr[] attrs)
Checks the attrs array if it has elements which were rendered incorrectly. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HtmlCheckAttributesUtil()
| Method Detail |
|---|
public static void checkRenderedAttributes(javax.faces.component.UIComponent component,
javax.faces.context.FacesContext context,
org.apache.shale.test.mock.MockResponseWriter writer,
HtmlRenderedAttr[] attrs)
throws java.lang.Exception
component - The component whose attributes will be tested.context - writer - The ResponseWriter used by the renderer to output the html generated.attrs - An array of attributes which will be tested.
java.lang.Exceptionpublic static boolean hasFailedAttrRender(HtmlRenderedAttr[] attrs)
attrs - The attributes to be checked.
public static java.lang.String constructErrorMessage(HtmlRenderedAttr[] attrs,
java.lang.String actual)
attrs - The attributes to be tested.actual - The html generated by the renderer.
public static HtmlRenderedAttr[] generateBasicAttrs()
public static HtmlRenderedAttr[] generateAttrsNotRenderedForReadOnly()
public static HtmlRenderedAttr[] generateBasicReadOnlyAttrs()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||