Browse Source

menu refactor

feature-vault
fdai6352 3 years ago
parent
commit
881a3234dd
  1. 3
      src/main/java/Vault.java
  2. 10
      src/test/java/VaultTest.java

3
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){

10
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();

Loading…
Cancel
Save