public class HtmlCheckAttributesUtil extends Object
Constructor and Description |
---|
HtmlCheckAttributesUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
checkRenderedAttributes(HtmlRenderedAttr[] attrs,
String output)
Iterates through all elements of attrs to check if they are only rendered once in output.
|
static void |
checkRenderedAttributes(UIComponent component,
FacesContext context,
org.apache.myfaces.test.mock.MockResponseWriter writer,
HtmlRenderedAttr[] attrs)
This method adds all attributes from attrs into the component.
|
static String |
constructErrorMessage(HtmlRenderedAttr[] attrs,
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.
|
public static void checkRenderedAttributes(HtmlRenderedAttr[] attrs, String output) throws Exception
attrs
- The attributes to be checked.output
- The html output of the component's renderer.Exception
public static void checkRenderedAttributes(UIComponent component, FacesContext context, org.apache.myfaces.test.mock.MockResponseWriter writer, HtmlRenderedAttr[] attrs) throws 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.Exception
public static boolean hasFailedAttrRender(HtmlRenderedAttr[] attrs)
attrs
- The attributes to be checked.public static String constructErrorMessage(HtmlRenderedAttr[] attrs, 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()
Copyright © 2020 The Apache Software Foundation. All rights reserved.