diff --git a/Task_Managment_Application/bin/Account_ModuleTest.class b/Task_Managment_Application/bin/Account_ModuleTest.class index 2c52a00..d740fff 100644 Binary files a/Task_Managment_Application/bin/Account_ModuleTest.class and b/Task_Managment_Application/bin/Account_ModuleTest.class differ diff --git a/Task_Managment_Application/bin/Manager_ModuleTest.class b/Task_Managment_Application/bin/Manager_ModuleTest.class index bc826b8..1ac2e7c 100644 Binary files a/Task_Managment_Application/bin/Manager_ModuleTest.class and b/Task_Managment_Application/bin/Manager_ModuleTest.class differ diff --git a/Task_Managment_Application/src/Account_ModuleTest.java b/Task_Managment_Application/src/Account_ModuleTest.java index 0500b42..bf81a9e 100644 --- a/Task_Managment_Application/src/Account_ModuleTest.java +++ b/Task_Managment_Application/src/Account_ModuleTest.java @@ -1,14 +1,28 @@ import static org.junit.Assert.*; +import java.io.IOException; + import org.junit.Test; -public class Account_ModuleTest +import junit.framework.TestCase; + +import static org.junit.Assert.assertEquals; +public class Account_ModuleTest { @Test - public void testAccount_Module() + public void testAccount_Module() throws IOException { - fail("Not yet implemented"); + Main main = new Main(); + main.main(null); + Account_Module am = main.get_account_module(); + + boolean valid_register = am.add_user_to_list("a_new_name", "anything_goes"); + assertEquals(valid_register, true); + boolean invalid_register = am.add_user_to_list("a_new_name", "anything_goes"); + assertEquals(invalid_register, false); + + } } diff --git a/Task_Managment_Application/src/Manager_ModuleTest.java b/Task_Managment_Application/src/Manager_ModuleTest.java index a1eda17..2dd57f1 100644 --- a/Task_Managment_Application/src/Manager_ModuleTest.java +++ b/Task_Managment_Application/src/Manager_ModuleTest.java @@ -1,20 +1,22 @@ import static org.junit.Assert.*; +import java.io.IOException; + import org.junit.Test; -public class Manager_ModuleTest extends Manager_Module +public class Manager_ModuleTest { - public Manager_ModuleTest(String username) - { - super(username); - // TODO Auto-generated constructor stub - } - @Test - public void testManager_Module() + public void testManager_Module() throws IOException { - fail("Not yet implemented"); + Main main = new Main(); + main.main(null); + Account_Module am = main.get_account_module(); + am.add_user_to_list("david", "pass"); + Manager_Module mm = main.get_account_module().get_new_manager_module("david"); + + } }