Browse Source

fix vault test encoding to run maven test on linux console

feature-fix-vault-test-1
binsky 3 years ago
parent
commit
fc92c555ad
  1. 6
      src/main/java/Vault.java
  2. 7
      src/test/java/VaultTest.java

6
src/main/java/Vault.java

@ -116,7 +116,7 @@ public class Vault implements VaultInterface {
println("Your PWs contain now capitals.");
}else if(input.equals("no")){
haveCapitals = false;
println("Your PWs don´t have capitals anymore.");
println("Your PWs don't have capitals anymore.");
}
}
@ -128,7 +128,7 @@ public class Vault implements VaultInterface {
println("Your PWs contain now special characters.");
}else if(input.equals("no")){
hasSpecialChars = false;
println("Your PWs don´t have special characters anymore.");
println("Your PWs don't have special characters anymore.");
}
}
@ -139,7 +139,7 @@ public class Vault implements VaultInterface {
println("Your PWs contains now numbers.");
}else if(input.equals("no")){
hasNumbers = false;
println("Your PWs don´t have numbers anymore.");
println("Your PWs don't have numbers anymore.");
}
}

7
src/test/java/VaultTest.java

@ -180,7 +180,8 @@ public class VaultTest {
vlt.setCapital("no");
assertFalse(vlt.haveCapitals = false);
assertTrue(outputStream.toString().contains("don´t"));
assertTrue(outputStream.toString().contains("don't"));
System.out.println(outputStream.toString());
}
/*@Test
@ -204,7 +205,7 @@ public class VaultTest {
vlt.setSpecialChar("no");
assertFalse(vlt.hasSpecialChars = false);
assertTrue(outputStream.toString().contains("don´t"));
assertTrue(outputStream.toString().contains("don't"));
}
/*@Test
@ -229,7 +230,7 @@ public class VaultTest {
vlt.setNumbers("no");
assertFalse(vlt.hasNumbers = false);
assertTrue(outputStream.toString().contains("don´t"));
assertTrue(outputStream.toString().contains("don't"));
}
private ByteArrayInputStream getEmptyStringInputStream() {

Loading…
Cancel
Save