diff --git a/src/main/java/Vault.java b/src/main/java/Vault.java index c983547..463ea5d 100644 --- a/src/main/java/Vault.java +++ b/src/main/java/Vault.java @@ -12,6 +12,7 @@ public class Vault implements VaultInterface { public boolean hasSpecialChars; public boolean hasNumbers; public String userName; + public boolean credentialM; InputStream inputS = System.in; OutputStream outputS = System.out; diff --git a/src/test/java/VaultTest.java b/src/test/java/VaultTest.java index 37be30d..738afef 100644 --- a/src/test/java/VaultTest.java +++ b/src/test/java/VaultTest.java @@ -35,6 +35,13 @@ public class VaultTest { assertTrue(outputStream.toString().startsWith("Configure")); } + @Test + void exitConfigureMenu(){ + vlt.inputS = new ByteArrayInputStream("e".getBytes(StandardCharsets.UTF_8)); + vlt.credentialMenu(); + assertFalse(vlt.credentialM); + } + @Test void addCredentialTest() { vlt.addCredential();}