|
@ -51,14 +51,14 @@ public class VaultTest { |
|
|
assertTrue(outputStream.toString().contains("Add")); |
|
|
assertTrue(outputStream.toString().contains("Add")); |
|
|
}*/ |
|
|
}*/ |
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
|
/*@Test |
|
|
void openShowCredentialMenuItem() { |
|
|
void openShowCredentialMenuItem() { |
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
|
|
vlt.inputS = new ByteArrayInputStream("c\n1".getBytes(StandardCharsets.UTF_8)); |
|
|
vlt.inputS = new ByteArrayInputStream("c\n1".getBytes(StandardCharsets.UTF_8)); |
|
|
vlt.outputS = outputStream; |
|
|
vlt.outputS = outputStream; |
|
|
vlt.credentialMenu(); |
|
|
vlt.credentialMenu(); |
|
|
assertTrue(outputStream.toString().contains("Type")); |
|
|
assertTrue(outputStream.toString().contains("Type")); |
|
|
} |
|
|
|
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
void openEditCredentialMenuItem() { |
|
|
void openEditCredentialMenuItem() { |
|
@ -90,18 +90,20 @@ public class VaultTest { |
|
|
assertEquals("password",vlt.password); |
|
|
assertEquals("password",vlt.password); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* @Test |
|
|
|
|
|
|
|
|
@Test |
|
|
void showCredentialTest() { |
|
|
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(); |
|
|
vlt.credentialMenu(); |
|
|
|
|
|
|
|
|
assertFalse(vlt.isInt); |
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
assertTrue(outputStream.toString().contains("name")); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|