|
|
@ -1,6 +1,7 @@ |
|
|
|
import org.junit.jupiter.api.BeforeAll; |
|
|
|
import org.junit.jupiter.api.BeforeEach; |
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
import org.mockito.Mockito; |
|
|
|
|
|
|
|
import java.io.ByteArrayInputStream; |
|
|
|
import java.io.ByteArrayOutputStream; |
|
|
@ -38,9 +39,6 @@ public class VaultTest { |
|
|
|
@Test |
|
|
|
void loadFromJson() {vlt.loadFromJson();} |
|
|
|
|
|
|
|
@Test |
|
|
|
void setPWLength() {vlt.setPWLength();} |
|
|
|
|
|
|
|
@Test |
|
|
|
void openConfigureMenu() { |
|
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
|
|
@ -71,7 +69,13 @@ public class VaultTest { |
|
|
|
assertTrue(outputStream.toString().startsWith("Configure:")); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
void openSetPWLength() { |
|
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
|
|
|
vlt.outputS = outputStream; |
|
|
|
vlt.setPWLength(); |
|
|
|
assertTrue(outputStream.toString().startsWith("Set")); |
|
|
|
} |
|
|
|
|
|
|
|
private ByteArrayInputStream getEmptyStringInputStream() { |
|
|
|
return new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8)); |
|
|
|