Browse Source

VaultTest refactor

feature-vault
fdai6352 3 years ago
parent
commit
b8ebd3b2f2
  1. 8
      src/test/java/VaultTest.java

8
src/test/java/VaultTest.java

@ -26,9 +26,6 @@ public class VaultTest {
vlt.inputS = System.in; vlt.inputS = System.in;
} }
@Test
void configure() {vlt.configure();}
@Test @Test
void addCredential() {vlt.addCredential();} void addCredential() {vlt.addCredential();}
@ -44,7 +41,7 @@ public class VaultTest {
@Test @Test
void openConfigureMenu() { void openConfigureMenu() {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
vlt.inputS = getEmptyStringInputStream();
vlt.inputS = new ByteArrayInputStream("__\n".getBytes(StandardCharsets.UTF_8));
vlt.outputS = outputStream; vlt.outputS = outputStream;
vlt.configure(); vlt.configure();
assertTrue(outputStream.toString().startsWith("Configure:")); assertTrue(outputStream.toString().startsWith("Configure:"));
@ -71,6 +68,9 @@ public class VaultTest {
assertTrue(outputStream.toString().startsWith("Configure:")); assertTrue(outputStream.toString().startsWith("Configure:"));
} }
// @Test
// void
private ByteArrayInputStream getEmptyStringInputStream() { private ByteArrayInputStream getEmptyStringInputStream() {

Loading…
Cancel
Save