public class HTMLAssertion extends AbstractTestElement implements Serializable, Assertion
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DOCTYPE |
static String |
DOCTYPE_KEY |
static String |
ERROR_THRESHOLD_KEY |
static String |
ERRORS_ONLY_KEY |
static String |
FILENAME_KEY |
static String |
FORMAT_KEY |
static String |
WARNING_THRESHOLD_KEY |
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
HTMLAssertion() |
Modifier and Type | Method and Description |
---|---|
String |
getDoctype()
Gets the doctype
|
long |
getErrorThreshold()
Gets the threshold setting for errors
|
String |
getFilename()
Sets the name of the file where tidy writes the output to
|
AssertionResult |
getResult(SampleResult inResponse)
Returns the result of the Assertion.
|
long |
getWarningThreshold()
Gets the threshold setting for warnings
|
boolean |
isErrorsOnly()
Check if errors will be reported only
|
boolean |
isHTML()
Check if html validation mode is set
|
boolean |
isXHTML()
Check if xhtml validation mode is set
|
boolean |
isXML()
Check if xml validation mode is set
|
void |
setDoctype(String inDoctype)
Sets the doctype setting
|
void |
setErrorsOnly(boolean inErrorsOnly)
Sets if errors should be tracked only
|
void |
setErrorThreshold(long inErrorThreshold)
Sets the threshold on error level
|
void |
setFilename(String inName)
Sets the name of the tidy output file
|
void |
setHTML()
Enables html validation mode
|
void |
setWarningThreshold(long inWarningThreshold)
Sets the threshold on warning level
|
void |
setXHTML()
Enables xhtml validation mode
|
void |
setXML()
Enables xml validation mode
|
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
removed
public static final String DEFAULT_DOCTYPE
public static final String DOCTYPE_KEY
public static final String ERRORS_ONLY_KEY
public static final String ERROR_THRESHOLD_KEY
public static final String WARNING_THRESHOLD_KEY
public static final String FORMAT_KEY
public static final String FILENAME_KEY
public AssertionResult getResult(SampleResult inResponse)
public String getDoctype()
public boolean isErrorsOnly()
public long getErrorThreshold()
public long getWarningThreshold()
public void setDoctype(String inDoctype)
inDoctype
- The doctype to be set. If doctype
is
null
or a blank string, DEFAULT_DOCTYPE
will be
usedpublic void setErrorsOnly(boolean inErrorsOnly)
inErrorsOnly
- Flag whether only errors should be trackedpublic void setErrorThreshold(long inErrorThreshold)
inErrorThreshold
- The max number of parse errors which are to be toleratedIllegalArgumentException
- if inErrorThreshold
is less or equals zeropublic void setWarningThreshold(long inWarningThreshold)
inWarningThreshold
- The max number of warnings which are to be toleratedIllegalArgumentException
- if inWarningThreshold
is less or equal zeropublic void setHTML()
public boolean isHTML()
public void setXHTML()
public boolean isXHTML()
public void setXML()
public boolean isXML()
public String getFilename()
public void setFilename(String inName)
inName
- The name of the file tidy will put its output toCopyright © 1998-2019 Apache Software Foundation. All Rights Reserved.