@Test public void passwordDidntMatchError() { SignUpResultPage resultPage = signUpPage.signUp(correctName, password, incorrectConfirmPassword, "", correctEmail); Assert.assertEquals( Source.getValue("SignUpErrorPasswordDidntMatchError"), resultPage.getErrorText()); }
@Test public void nameIsTakenError() { String userName = getExistentName(); Assume.assumeThat(userName, CoreMatchers.notNullValue()); SignUpResultPage resultPage = signUpPage.signUp(userName, password, password, "", correctEmail); Assert.assertEquals(Source.getValue("SignUpErrorNameIsTakenError"), resultPage.getErrorText()); }
/** Test of getSourceNodes method, of class Source. */ @Test public void testBase() { final Source s = new Source(); final InputNode N1 = new InputNode(1); final InputNode N2 = new InputNode(2); s.addSourceNode(N1); assertEquals(s.getSourceNodes(), Arrays.asList(N1)); assertEquals(s.getSourceNodesAsSet(), new LinkedHashSet<>(Arrays.asList(1))); s.addSourceNode(N2); assertEquals(s.getSourceNodes(), Arrays.asList(N1, N2)); assertEquals(s.getSourceNodesAsSet(), new LinkedHashSet<>(Arrays.asList(1, 2))); s.addSourceNode(N1); assertEquals(s.getSourceNodes(), Arrays.asList(N1, N2)); assertEquals(s.getSourceNodesAsSet(), new LinkedHashSet<>(Arrays.asList(1, 2))); }
@Test public void passwordIsRequiredError() { SignUpResultPage resultPage = signUpPage.signUp(correctName, null, password, "", correctEmail); Assert.assertEquals( Source.getValue("SignUpErrorPasswordIsRequired"), resultPage.getErrorText()); }
@Test public void invalidEmailError() { SignUpResultPage resultPage = signUpPage.signUp(correctName, password, password, "", incorrectEmail); Assert.assertEquals(Source.getValue("SignUpErrorInvalidEmailError"), resultPage.getErrorText()); }
@Test public void successfulSignUp() { SignUpResultPage resultPage = signUpPage.signUp(correctName, password, password, "", correctEmail); Assert.assertEquals(Source.getValue("SignUpSuccess"), resultPage.getMessageText()); }