コード例 #1
0
  @Test
  public void testChangeEmailAddressValidEmailFaultyDatabase() {
    RegistrationPack registrationPack = new RegistrationPack();
    registrationPack.setEmailAddress(validEmail);
    dbStub.setEmailChanged(false);

    assertFalse(test.changeEmailAddress(registrationPack));
  }
コード例 #2
0
  @Test
  public void testChangeEmailAddressValidEmail() {
    RegistrationPack registrationPack = new RegistrationPack();
    registrationPack.setEmailAddress(validEmail);
    dbStub.setEmailChanged(true);

    assertTrue(test.changeEmailAddress(registrationPack));
  }
コード例 #3
0
 @Test
 public void testChangeEmailAddressInvalidEmail() {
   RegistrationPack registrationPack = new RegistrationPack();
   registrationPack.setEmailAddress(invalidEmail);
   assertFalse(test.changeEmailAddress(registrationPack));
 }