Package org.eclipse.jetty.toolchain.test
Class StringAssert
java.lang.Object
org.eclipse.jetty.toolchain.test.StringAssert
Deprecated, for removal: This API element is subject to removal in a future version.
Collection of common asserts for Strings.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertContains(String msg, String haystack, String needle) Deprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, haystack, containsString(needle));insteadstatic voidassertContains(String msg, String haystack, String needle, int offset) Deprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, haystack.substring(offset), containsString(needle));insteadstatic voidDeprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, linesActual, containsInAnyOrder(linesExpected.toArray()));insteadstatic voidassertNotContains(String msg, String haystack, String needle) Deprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, haystack, not(containsString(needle)));insteadstatic voidassertNotContains(String msg, String haystack, String needle, int offset) Deprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, haystack.substring(offset), not(containsString(needle)));insteadstatic voidassertStartsWith(String msg, String haystack, String expected) Deprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, haystack, startsWith(expected));instead
-
Constructor Details
-
StringAssert
private StringAssert()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
assertContains
@Deprecated(forRemoval=true, since="6.0") public static void assertContains(String msg, String haystack, String needle) Deprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, haystack, containsString(needle));insteadAsserts that string (haystack) contains specified text (needle).- Parameters:
msg- the assertion messagehaystack- the text to search inneedle- the text to search for
-
assertContains
@Deprecated(forRemoval=true, since="6.0") public static void assertContains(String msg, String haystack, String needle, int offset) Deprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, haystack.substring(offset), containsString(needle));insteadAsserts that string (haystack) contains specified text (needle), starting at offset (inhaystack).- Parameters:
msg- the assertion messagehaystack- the text to search inneedle- the text to search foroffset- the offset in (haystack) to perform search from
-
assertContainsSame
@Deprecated(forRemoval=true, since="6.0") public static void assertContainsSame(String msg, List<String> linesExpected, List<String> linesActual) Deprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, linesActual, containsInAnyOrder(linesExpected.toArray()));insteadAsserts that the list of String lines contains the same lines (without a regard for the order of those lines)- Parameters:
msg- the assertion messagelinesExpected- the list of expected lineslinesActual- the list of actual lines
-
assertNotContains
@Deprecated(forRemoval=true, since="6.0") public static void assertNotContains(String msg, String haystack, String needle) Deprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, haystack, not(containsString(needle)));insteadAsserts that string (haystack) does not contain specified text (needle).- Parameters:
msg- the assertion messagehaystack- the text to search inneedle- the text to search for
-
assertNotContains
@Deprecated(forRemoval=true, since="6.0") public static void assertNotContains(String msg, String haystack, String needle, int offset) Deprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, haystack.substring(offset), not(containsString(needle)));insteadAsserts that string (haystack) does not contain specified text (needle), starting at offset (inhaystack).- Parameters:
msg- the assertion messagehaystack- the text to search inneedle- the text to search foroffset- the offset in (haystack) to perform search from
-
assertStartsWith
@Deprecated(forRemoval=true, since="6.0") public static void assertStartsWith(String msg, String haystack, String expected) Deprecated, for removal: This API element is subject to removal in a future version.useassertThat(msg, haystack, startsWith(expected));insteadAsserts that the string (haystack) starts with the string (expected)- Parameters:
msg- the assertion messagehaystack- the text to search inexpected- the expected starts with text
-
assertThat()techniques