diff --git a/src/test/java/hs/fulda/de/ci/exam/project/AccountServiceTest.java b/src/test/java/hs/fulda/de/ci/exam/project/AccountServiceTest.java index 326576a..f9cd7b5 100644 --- a/src/test/java/hs/fulda/de/ci/exam/project/AccountServiceTest.java +++ b/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); + }); + } + }