|
@ -24,7 +24,7 @@ public class VaultTest { |
|
|
@BeforeEach |
|
|
@BeforeEach |
|
|
void reset() { |
|
|
void reset() { |
|
|
vlt.outputS = System.out; |
|
|
vlt.outputS = System.out; |
|
|
vlt.inputS = System.in; |
|
|
|
|
|
|
|
|
vlt.inputS = getEmptyStringInputStream(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
@ -94,9 +94,9 @@ 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() { |
|
|
vlt.inputS = new ByteArrayInputStream("l\n1".getBytes(StandardCharsets.UTF_8)); |
|
|
vlt.inputS = new ByteArrayInputStream("l\n1".getBytes(StandardCharsets.UTF_8)); |
|
|
vlt.credentialMenu(); |
|
|
vlt.credentialMenu(); |
|
|