|
@ -57,10 +57,10 @@ public class VaultTest { |
|
|
assertEquals("password",vlt.password); |
|
|
assertEquals("password",vlt.password); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/*@Test |
|
|
|
|
|
|
|
|
@Test |
|
|
void openShowCredentialMenuItem() { |
|
|
void openShowCredentialMenuItem() { |
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
|
|
vlt.inputS = new ByteArrayInputStream("c".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")); |
|
@ -75,7 +75,7 @@ public class VaultTest { |
|
|
assertTrue(outputStream.toString().contains("Type")); |
|
|
assertTrue(outputStream.toString().contains("Type")); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
|
/*@Test |
|
|
void addCredentialTest() { |
|
|
void addCredentialTest() { |
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
|
|
vlt.outputS = outputStream; |
|
|
vlt.outputS = outputStream; |
|
@ -86,7 +86,7 @@ public class VaultTest { |
|
|
assertEquals("peter", vlt.userName); |
|
|
assertEquals("peter", vlt.userName); |
|
|
assertTrue(outputStream.toString().contains("password")); |
|
|
assertTrue(outputStream.toString().contains("password")); |
|
|
assertEquals("password",vlt.password); |
|
|
assertEquals("password",vlt.password); |
|
|
}*/ |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
void showCredentialTest() { |
|
|
void showCredentialTest() { |
|
@ -104,7 +104,7 @@ public class VaultTest { |
|
|
|
|
|
|
|
|
assertTrue(outputStream.toString().contains("Type")); |
|
|
assertTrue(outputStream.toString().contains("Type")); |
|
|
assertFalse(vlt.isInt); |
|
|
assertFalse(vlt.isInt); |
|
|
} |
|
|
|
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
void getAsJson() {vlt.getAsJson();} |
|
|
void getAsJson() {vlt.getAsJson();} |
|
|