@ -120,4 +120,15 @@ public class Vault implements VaultInterface {
println("Your PWs don´t have numbers anymore.");
}
public void credentialMenu() {
StringBuilder sbcm = new StringBuilder();
sbcm.append("Configure credentials:\n");
sbcm.append("- add credential: a\n");
sbcm.append("- show credential: c\n");
sbcm.append("- exit: e\n");
println(sbcm.toString());
@ -27,6 +27,14 @@ public class VaultTest {
vlt.inputS = System.in;
@Test
void openCredentialMenu() {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
vlt.outputS = outputStream;
vlt.credentialMenu();
assertTrue(outputStream.toString().startsWith("Configure"));
void addCredentialTest() { vlt.addCredential();}