|
|
@ -28,17 +28,7 @@ public class VaultTest { |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void addCredentialTest() { |
|
|
|
String expected = "user"; |
|
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
|
|
|
vlt.inputS = new ByteArrayInputStream(expected.getBytes(StandardCharsets.UTF_8)); |
|
|
|
vlt.outputS = outputStream; |
|
|
|
vlt.addCredential(); |
|
|
|
|
|
|
|
assertTrue(outputStream.toString().startsWith("Add")); |
|
|
|
assertEquals(expected, vlt.userName); |
|
|
|
|
|
|
|
} |
|
|
|
void addCredentialTest() { vlt.addCredential();} |
|
|
|
|
|
|
|
@Test |
|
|
|
void showCredential() {vlt.showCredential();} |
|
|
|