From 351906a848f70716cbf25f2934aa3afd844eedd9 Mon Sep 17 00:00:00 2001 From: binsky Date: Mon, 24 Jan 2022 13:05:41 +0100 Subject: [PATCH] add tests for methods required by the password manager interface --- src/test/java/PasswordManagerTest.java | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/test/java/PasswordManagerTest.java b/src/test/java/PasswordManagerTest.java index d6d9d17..cdde10f 100644 --- a/src/test/java/PasswordManagerTest.java +++ b/src/test/java/PasswordManagerTest.java @@ -1,11 +1,30 @@ +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; + class PasswordManagerTest { + static PasswordManager pm; + + @BeforeAll + static void init() { + pm = new PasswordManager(); + } + @Test void constructor() { - PasswordManager pm = new PasswordManager(); + assertInstanceOf(PasswordManager.class, pm); + } + + @Test + void listVaults() { + pm.listVaults(); + } + + @Test + void openVault() { + pm.openVault(); } -} \ No newline at end of file +}