Simplify verifying that no redirect is called
[Sone.git] / src / test / java / net / pterodactylus / sone / web / pages / WebPageTest.java
index f341238..c785e36 100644 (file)
@@ -407,4 +407,13 @@ public abstract class WebPageTest {
                }
        }
 
+       protected void verifyNoRedirect(Runnable verification) throws RedirectException {
+               getPage().handleRequest(freenetRequest, templateContext);
+               verification.run();
+       }
+
+       protected void addTranslation(@Nonnull String key, @Nonnull String value) {
+               when(l10n.getString(key)).thenReturn(value);
+       }
+
 }