public class TestElement
extends TestCase
Modifier and Type | Field and Description |
---|---|
protected Document |
doc |
Constructor and Description |
---|
TestElement() |
Modifier and Type | Method and Description |
---|---|
void |
assertAttr(java.lang.String cssq,
java.lang.String attr,
java.lang.String value)
Check the attribute of the node, selected with "css" query, has the
expected value
of the selected node.
|
void |
assertAttrContains(java.lang.String cssq,
java.lang.String attr,
java.lang.String value)
Check the attribute of the node, selected with "css" query, contains the
expected value
of the selected node.
|
void |
assertHtml(java.lang.String cssq,
java.lang.String html)
Check that the html at the "css" query is the expected Note that is
selected only the internal of the selected node.
|
void |
assertOuterHtml(java.lang.String cssq,
java.lang.String html)
Check that the html at the "css" query is the expected Note that it is
returned also the selected node.
|
void |
assertText(java.lang.String cssq,
java.lang.String text)
Check the text, selected with the "css" query, has the expected value
of the selected node.
|
void |
assertTextContains(java.lang.String cssq,
java.lang.String text)
Check the text selected with the "css" query, is contained as a
substring.
|
java.lang.String |
attr(java.lang.String cssq,
java.lang.String attr)
Return the attribute specified by the cssquery and the name
|
java.util.List<java.lang.String> |
col(java.lang.String... elements)
Create a column - use: col("name", "v1", "v2", "v3")
|
protected void |
dump(Log log)
Dump generated outer html
|
protected void |
dump(Log log,
Content c)
Dump generated outer html
|
protected void |
dump(Log log,
Content c,
java.lang.String name)
Dump a content attribute in a logger
|
protected void |
dump(java.io.PrintStream out)
Dump generated outer html to a print writer (System.out for example)
|
protected void |
dump(java.io.PrintStream out,
Content c)
Dump generated outer html
|
protected void |
dump(java.io.PrintStream out,
Content c,
java.lang.String name)
Dump a content attribute to a System.out
|
TestEnv |
env(Arg... args)
Return current env not routed (so no variables coming from the router)
|
TestEnv |
env(java.lang.String path,
Arg... args)
Return the current env routed (so variables coming from router are
available)
|
java.lang.String |
html(java.lang.String cssq)
Return the html specified by the cssquery
|
java.lang.String |
outerHtml(java.lang.String cssq)
Return the outer html specified by the cssquery
|
void |
parse(Call call)
Parse a call
|
void |
parse(java.lang.String html)
Parse generated html
|
Elements |
select(java.lang.String cssq)
Return an html node suitable for Jsoup manipulation
|
java.lang.String |
text(java.lang.String cssq)
Return the text html specified by the cssquery
|
URL |
url(java.lang.String url)
Create an url
|
public void parse(java.lang.String html)
html
- public TestEnv env(Arg... args)
public TestEnv env(java.lang.String path, Arg... args)
public void parse(Call call)
public URL url(java.lang.String url)
public java.util.List<java.lang.String> col(java.lang.String... elements)
elements
- public Elements select(java.lang.String cssq)
public java.lang.String html(java.lang.String cssq)
cssq
- public java.lang.String outerHtml(java.lang.String cssq)
cssq
- public java.lang.String text(java.lang.String cssq)
cssq
- public java.lang.String attr(java.lang.String cssq, java.lang.String attr)
cssq
- public void assertHtml(java.lang.String cssq, java.lang.String html)
cssq
- html
- public void assertOuterHtml(java.lang.String cssq, java.lang.String html)
cssq
- html
- public void assertText(java.lang.String cssq, java.lang.String text)
cssq
- html
- public void assertTextContains(java.lang.String cssq, java.lang.String text)
cssq
- html
- public void assertAttr(java.lang.String cssq, java.lang.String attr, java.lang.String value)
cssq
- html
- public void assertAttrContains(java.lang.String cssq, java.lang.String attr, java.lang.String value)
cssq
- html
- protected void dump(Log log)
log
- protected void dump(java.io.PrintStream out)
log
- protected void dump(java.io.PrintStream out, Content c)
log
- protected void dump(Log log, Content c, java.lang.String name)
log
- protected void dump(java.io.PrintStream out, Content c, java.lang.String name)
log
-