Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AuthenticationTest extends AbstractWebTest {
- @Rule
- public DbUnitRule dbUnitRule = new DbUnitRule("/ds/default-user.ds.yaml");
- @Test
- public void isRedirectedToLoginPageByDefault() throws Exception {
- app.open();
- app.assertIsOnLoginPage();
- }
- @Test
- public void canLogin() throws Exception {
- app.open()
- .enterLogin("user")
- .enterPassword("pwd")
- .submit();
- app.assertIsNotOnLoginPage();
- }
- @Test
- public void canLogout() throws Exception {
- app.open().defaultLogin();
- StatusRegionDriver status = app.status();
- status.logout();
- app.assertIsOnLoginPage();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement