Browse Source

Should Not Create Account when Password is blank or null

feature-pr-AccountService
Sona Markosyan 2 years ago
parent
commit
79024b0504
  1. 8
      src/test/java/hs/fulda/de/ci/exam/project/AccountServiceTest.java

8
src/test/java/hs/fulda/de/ci/exam/project/AccountServiceTest.java

@ -107,4 +107,12 @@ public class AccountServiceTest {
});
}
@Test
@DisplayName("Should Not Create Account when password is blank")
public void shouldThrowRuntimeExceptionWhenPasswordIsNull(){
assertThrows(RuntimeException.class, () -> {
accountService.createAccount("John", "", Account.AccountStatus.ACTIVE);
});
}
}
Loading…
Cancel
Save