public final class AssertHtml extends Object
Modifier and Type | Method and Description |
---|---|
static void |
assertEquals(String expected,
String actual)
Check if the HTML is identical to the expected.
|
static void |
assertSimilar(String expected,
String actual)
Check if the HTML is similar to the expected.
|
public static void assertEquals(String expected, String actual)
Document
s. Two documents are considered to be
"identical" if they contain the same elements and attributes in the same
order.
For each difference, the difference will be logged with error level. It
will generate a ComparisonFailure
with the expected string and
actual string in order to be able to visualize the differences on sources
directly in the IDE.
expected
- the expected HTMLactual
- the HTML content to checkpublic static void assertSimilar(String expected, String actual)
Document
s. Two documents are considered to be "similar" if
they contain the same elements and attributes regardless of order.
For each difference, the difference will be logged with error level. It
will generate a ComparisonFailure
with the expected string and
actual string in order to be able to visualize the differences on sources
directly in the IDE.
expected
- the expected HTMLactual
- the HTML content to checkCopyright © 2021. All rights reserved.