- fix expected message text from library
This commit is contained in:
jdyer1
2023-11-06 15:11:11 -06:00
committed by Lukasz Lenart
parent b21be75703
commit 92cc4f8597
@@ -343,28 +343,28 @@ public class CookieInterceptorTest extends StrutsInternalTestCase {
new Cookie(pollution1, "pollution1");
fail("It shouldn't be possible to create cookie: " + pollution1);
} catch (IllegalArgumentException e) {
assertEquals(e.getMessage(), "Cookie name \"" + pollution1 + "\" is a reserved token");
assertTrue(e.getMessage(), e.getMessage().startsWith("Cookie name \"" + pollution1 + "\" is a reserved token"));
}
try {
new Cookie(pollution4, "pollution4");
fail("It shouldn't be possible to create cookie: " + pollution4);
} catch (IllegalArgumentException e) {
assertEquals(e.getMessage(), "Cookie name \"" + pollution4 + "\" is a reserved token");
assertTrue(e.getMessage(), e.getMessage().startsWith("Cookie name \"" + pollution4 + "\" is a reserved token"));
}
try {
new Cookie(pollution5, "pollution5");
fail("It shouldn't be possible to create cookie: " + pollution5);
} catch (IllegalArgumentException e) {
assertEquals(e.getMessage(), "Cookie name \"" + pollution5 + "\" is a reserved token");
assertTrue(e.getMessage(), e.getMessage().startsWith("Cookie name \"" + pollution5 + "\" is a reserved token"));
}
try {
new Cookie(pollution6, "pollution6");
fail("It shouldn't be possible to create cookie: " + pollution6);
} catch (IllegalArgumentException e) {
assertEquals(e.getMessage(), "Cookie name \"" + pollution6 + "\" is a reserved token");
assertTrue(e.getMessage(), e.getMessage().startsWith("Cookie name \"" + pollution6 + "\" is a reserved token"));
}
request.setCookies(