AssertLinesMatch is a collection of utility methods that support asserting
lines of String equality or java.util.regex.Pattern -match in tests.
| Modifier and Type | Class and Description |
|---|---|
| private static record |
| Modifier and Type | Field and Description |
|---|---|
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | |
| pack-priv static void | |
| pack-priv static void | |
| pack-priv static void | |
| pack-priv static void | |
| pack-priv static void | |
| pack-priv static boolean | |
| pack-priv static boolean | |
| pack-priv static int |
| MAX_SNIPPET_LENGTH | back to summary |
|---|---|
| private static final int MAX_SNIPPET_LENGTH | |
| AssertLinesMatch | back to summary |
|---|---|
| private AssertLinesMatch() | |
| assertLinesMatch | back to summary |
|---|---|
| pack-priv static void assertLinesMatch(List<String> expectedLines, List<String> actualLines) | |
| assertLinesMatch | back to summary |
|---|---|
| pack-priv static void assertLinesMatch(List<String> expectedLines, List<String> actualLines, @Nullable String message) | |
| assertLinesMatch | back to summary |
|---|---|
| pack-priv static void assertLinesMatch(Stream<String> expectedLines, Stream<String> actualLines) | |
| assertLinesMatch | back to summary |
|---|---|
| pack-priv static void assertLinesMatch(Stream<String> expectedLines, Stream<String> actualLines, @Nullable String message) | |
| assertLinesMatch | back to summary |
|---|---|
| pack-priv static void assertLinesMatch(Stream<String> expectedLines, Stream<String> actualLines, @Nullable Object messageOrSupplier) | |
| assertLinesMatch | back to summary |
|---|---|
| pack-priv static void assertLinesMatch(List<String> expectedLines, List<String> actualLines, @Nullable Object messageOrSupplier) | |
| isFastForwardLine | back to summary |
|---|---|
| pack-priv static boolean isFastForwardLine(String line) | |
| matches | back to summary |
|---|---|
| pack-priv static boolean matches(String expectedLine, String actualLine) | |
| parseFastForwardLimit | back to summary |
|---|---|
| pack-priv static int parseFastForwardLimit(String fastForwardLine) | |
| Modifier and Type | Field and Description |
|---|---|
| private final List | actualLines
Record Component accessed by actualLines(). |
| private final List | expectedLines
Record Component accessed by expectedLines(). |
| private final @Nullable Object | messageOrSupplier
Record Component accessed by messageOrSupplier(). |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public List | |
| pack-priv void | |
| pack-priv void | |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public List | |
| pack-priv void | |
| public final int | |
| public @Nullable Object | |
| pack-priv String | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| actualLines | back to summary |
|---|---|
| private final List<String> actualLines Record Component accessed by actualLines(). | |
| expectedLines | back to summary |
|---|---|
| private final List<String> expectedLines Record Component accessed by expectedLines(). | |
| messageOrSupplier | back to summary |
|---|---|
| private final @Nullable Object messageOrSupplier Record Component accessed by messageOrSupplier(). | |
| LinesMatcher | back to summary |
|---|---|
| private LinesMatcher(List<String> expectedLines, List<String> actualLines, @Nullable Object messageOrSupplier) | |
| actualLines | back to summary |
|---|---|
| public List Record Component getter of actualLines. | |
| assertLinesMatch | back to summary |
|---|---|
| pack-priv void assertLinesMatch() | |
| assertLinesMatchWithFastForward | back to summary |
|---|---|
| pack-priv void assertLinesMatchWithFastForward() | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| expectedLines | back to summary |
|---|---|
| public List Record Component getter of expectedLines. | |
| fail | back to summary |
|---|---|
| pack-priv void fail(String format, Object... args) | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| messageOrSupplier | back to summary |
|---|---|
| public @Nullable Object messageOrSupplier() Record Component getter of messageOrSupplier. | |
| snippet | back to summary |
|---|---|
| pack-priv String snippet(String line) | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |