public class A11yAssert
extends junit.framework.Assert
| Modifier and Type | Class and Description | 
|---|---|
static interface  | 
A11yAssert.NodeInfoPrinter
Interface for printing Accessibility Node Infos to a string. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
A11yAssert | 
assertOnFailure(boolean doAssert)
Change whether or not failures are asserted or just logged to logcat. 
 | 
A11yAssert | 
ignore(java.lang.Class<? extends Rule> clazz)
Remove a single rule from the test. 
 | 
A11yAssert | 
ignore(java.lang.Class<? extends Rule> clazz,
      A11yNodeInfo.Matcher matcher)
Specify the content description of a failure that you wish to ignore for this test. 
 | 
A11yAssert | 
ignoreBeneath(Impact impact)
Ignore violations below the given impact level. 
 | 
void | 
isAccessible()
All assertions should end with isAccessible(). 
 | 
A11yAssert | 
rule(java.lang.Class<? extends Rule> clazz)
Add a rule to the test. 
 | 
A11yAssert | 
rules(java.util.Collection<java.lang.Class<? extends Rule>> classes)
Add a collection of rules to the test. 
 | 
A11yAssert | 
ruleSet(Rule.RuleSet ruleSet)
Set rules from a pre built list of rules. 
 | 
static void | 
setNodeInfoPrinter(A11yAssert.NodeInfoPrinter nodeInfoPrinter)
Change the way Nodes print when reporting results. 
 | 
static A11yAssert | 
thatA11yNode(android.content.Context ctx,
            A11yNodeInfo nodeInfo)
Test the given accessibility node. 
 | 
static A11yAssert | 
thatInstrumentation(android.app.Instrumentation instrumentation)
Test the entire screen content of an Android Instrumentation object. 
 | 
static A11yAssert | 
thatRoboActivity(android.app.Activity activity)
Test the entire screen content of a robolectric activity. 
 | 
A11yAssert | 
verboseOutput()
Include passing nodes and the complete accessibility hierarchy in output. 
 | 
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, formatpublic static A11yAssert thatRoboActivity(android.app.Activity activity)
activity - The activity containing the root node under test.public static A11yAssert thatInstrumentation(android.app.Instrumentation instrumentation)
instrumentation - The instrumentation to testpublic static A11yAssert thatA11yNode(android.content.Context ctx, A11yNodeInfo nodeInfo)
ctx - The context which contains the node info that is being tested.nodeInfo - The node info to be tested.public A11yAssert assertOnFailure(boolean doAssert)
doAssert - If true, a test failure results in an assertion.public A11yAssert ignore(java.lang.Class<? extends Rule> clazz, A11yNodeInfo.Matcher matcher)
clazz - The rule to ignore.matcher - A matcher object to compare against the node.public A11yAssert ignoreBeneath(Impact impact)
impact - The lowest failure impact level.public void isAccessible()
public A11yAssert rule(java.lang.Class<? extends Rule> clazz)
clazz - A class extending DQA11yRule to be tested.public A11yAssert rules(java.util.Collection<java.lang.Class<? extends Rule>> classes)
classes - A list of classes extending DQA11yRule that will be tested.public A11yAssert ruleSet(Rule.RuleSet ruleSet)
ruleSet - The rule set to use.public A11yAssert ignore(java.lang.Class<? extends Rule> clazz)
clazz - A class extending DQA11yRule to be removed.public static void setNodeInfoPrinter(A11yAssert.NodeInfoPrinter nodeInfoPrinter)
nodeInfoPrinter - public A11yAssert verboseOutput()