From 881a3234dd873a850ac511ab7c9a2720e8066713 Mon Sep 17 00:00:00 2001 From: fdai6352 Date: Wed, 16 Feb 2022 17:51:47 +0100 Subject: [PATCH] menu refactor --- src/main/java/Vault.java | 3 --- src/test/java/VaultTest.java | 10 ---------- 2 files changed, 13 deletions(-) diff --git a/src/main/java/Vault.java b/src/main/java/Vault.java index 1cdc10b..53cb362 100644 --- a/src/main/java/Vault.java +++ b/src/main/java/Vault.java @@ -47,10 +47,7 @@ public class Vault implements VaultInterface { println("Should your PW have capitals? Type in yes or no."); String inputC = scan.nextLine(); setPWLength(inputC); - } else if (!input.equals("l")|!input.equals("e")|!input.equals("h")) { - println("Please enter valid key."); } - } public void setPWLength(String pwLength){ diff --git a/src/test/java/VaultTest.java b/src/test/java/VaultTest.java index c0a2ad7..d2a7dac 100644 --- a/src/test/java/VaultTest.java +++ b/src/test/java/VaultTest.java @@ -79,16 +79,6 @@ public class VaultTest { assertTrue(outputStream.toString().startsWith("Configure:")); } - @Test - void configureMenuWrongInputMessage() { - ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - vlt.inputS = new ByteArrayInputStream("__\n".getBytes(StandardCharsets.UTF_8)); - vlt.outputS = outputStream; - vlt.configure(); - assertTrue(outputStream.toString().contains("Please")); - } - - @Test void openSetPWLengthMenuItem() { ByteArrayOutputStream outputStream = new ByteArrayOutputStream();