You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
737 B
39 lines
737 B
import org.junit.jupiter.api.BeforeAll;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import java.io.BufferedInputStream;
|
|
import java.io.ByteArrayInputStream;
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
import static org.junit.jupiter.api.Assertions.*;
|
|
|
|
|
|
class PasswordManagerTest {
|
|
|
|
static PasswordManager pm;
|
|
|
|
@BeforeAll
|
|
static void init() {
|
|
pm = new PasswordManager();
|
|
}
|
|
|
|
@Test
|
|
void constructor() {
|
|
assertInstanceOf(PasswordManager.class, pm);
|
|
}
|
|
|
|
@Test
|
|
void listVaults() {
|
|
pm.listVaults();
|
|
}
|
|
|
|
@Test
|
|
void openVault() {
|
|
pm.openVault();
|
|
}
|
|
|
|
@Test
|
|
void showMenu() {
|
|
pm.showMenu(new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8)));
|
|
}
|
|
}
|