@Test public void testChangeEmailAddressValidEmailFaultyDatabase() { RegistrationPack registrationPack = new RegistrationPack(); registrationPack.setEmailAddress(validEmail); dbStub.setEmailChanged(false); assertFalse(test.changeEmailAddress(registrationPack)); }
@Test public void testChangeEmailAddressValidEmail() { RegistrationPack registrationPack = new RegistrationPack(); registrationPack.setEmailAddress(validEmail); dbStub.setEmailChanged(true); assertTrue(test.changeEmailAddress(registrationPack)); }
@Test public void testChangeEmailAddressInvalidEmail() { RegistrationPack registrationPack = new RegistrationPack(); registrationPack.setEmailAddress(invalidEmail); assertFalse(test.changeEmailAddress(registrationPack)); }