Browse Source

temporarily deleted addCredential

feature-vault
fdai6352 3 years ago
parent
commit
a18ebb7438
  1. 7
      src/main/java/Vault.java
  2. 12
      src/test/java/VaultTest.java

7
src/main/java/Vault.java

@ -72,13 +72,6 @@ public class Vault implements VaultInterface {
public void addCredential(){
println("Add user name");
Scanner scan = new Scanner(inputS);
scan.nextLine();
userName = scan.nextLine();
}

12
src/test/java/VaultTest.java

@ -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();}

Loading…
Cancel
Save