File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/test/java/de/martinspielmann/wicket/pwnedpasswordsvalidator Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11package de .martinspielmann .wicket .pwnedpasswordsvalidator ;
22
3+ import org .apache .wicket .markup .html .form .FormComponent ;
34import org .apache .wicket .util .tester .FormTester ;
45import org .apache .wicket .util .tester .WicketTester ;
56import org .apache .wicket .validation .Validatable ;
@@ -154,6 +155,7 @@ public void feedbackPwnedPassword() {
154155 FormTester ft = tester .newFormTester ("form" );
155156 ft .setValue ("pw" , "secret123" );
156157 ft .submit ();
157- tester .assertErrorMessages ("This password has been cracked and is not secure anymore. Please choose another one." );
158+ String feedback = ft .getForm ().getLocalizer ().getString ("PwnedPasswordsValidator.pwned" , ft .getForm ().get ("pw" ));
159+ tester .assertErrorMessages (feedback );
158160 }
159161}
Original file line number Diff line number Diff line change 11package de .martinspielmann .wicket .pwnedpasswordsvalidator ;
22
3+ import org .apache .wicket .Session ;
34import org .apache .wicket .markup .html .WebPage ;
45import org .apache .wicket .protocol .http .WebApplication ;
6+ import org .apache .wicket .request .Request ;
7+ import org .apache .wicket .request .Response ;
8+
9+ import java .util .Locale ;
510
611/**
712 * Application object for your web application.
You can’t perform that action at this time.
0 commit comments