|
|
@ -51,14 +51,14 @@ public class VaultTest { |
|
|
|
assertTrue(outputStream.toString().contains("Add")); |
|
|
|
}*/ |
|
|
|
|
|
|
|
@Test |
|
|
|
/*@Test |
|
|
|
void openShowCredentialMenuItem() { |
|
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
|
|
|
vlt.inputS = new ByteArrayInputStream("c\n1".getBytes(StandardCharsets.UTF_8)); |
|
|
|
vlt.outputS = outputStream; |
|
|
|
vlt.credentialMenu(); |
|
|
|
assertTrue(outputStream.toString().contains("Type")); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
@Test |
|
|
|
void openEditCredentialMenuItem() { |
|
|
@ -90,18 +90,20 @@ public class VaultTest { |
|
|
|
assertEquals("password",vlt.password); |
|
|
|
} |
|
|
|
|
|
|
|
/* @Test |
|
|
|
@Test |
|
|
|
void showCredentialTest() { |
|
|
|
vlt.inputS = new ByteArrayInputStream("l\n1".getBytes(StandardCharsets.UTF_8)); |
|
|
|
vlt.showCredential();credential(); |
|
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
|
|
|
vlt.outputS = outputStream; |
|
|
|
vlt.inputS = new ByteArrayInputStream("1".getBytes(StandardCharsets.UTF_8)); |
|
|
|
vlt.showCredential(); |
|
|
|
|
|
|
|
assertTrue(outputStream.toString().contains("username")); |
|
|
|
assertTrue(outputStream.toString().contains("ID")); |
|
|
|
|
|
|
|
vlt.inputS = new ByteArrayInputStream("l\npeter".getBytes(StandardCharsets.UTF_8)); |
|
|
|
vlt.inputS = new ByteArrayInputStream("peter".getBytes(StandardCharsets.UTF_8)); |
|
|
|
vlt.credentialMenu(); |
|
|
|
|
|
|
|
assertFalse(vlt.isInt); |
|
|
|
}*/ |
|
|
|
assertTrue(outputStream.toString().contains("name")); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|