bugfix3
authorMichael <Michael@Michael-LT.bfh.ch>
Wed, 21 Oct 2015 09:42:08 +0000 (11:42 +0200)
committerMichael <Michael@Michael-LT.bfh.ch>
Wed, 21 Oct 2015 09:42:08 +0000 (11:42 +0200)
src/test/java/ch/bfh/ti/srs/core/UserTest.java

index 5b9f9b8..ac1e090 100644 (file)
@@ -31,12 +31,14 @@ public class UserTest {
        \r
        @Test\r
        public void checkPasswordTest() {\r
+               TestUser = new User("TestUser","pass");\r
                assertTrue(TestUser.checkPassword("pass"));\r
                assertFalse(TestUser.checkPassword("notmypass"));\r
        }\r
        \r
        @Test\r
        public void changePasswordTest() {\r
+               TestUser = new User("TestUser","pass");\r
                assertTrue(TestUser.checkPassword("pass"));\r
                TestUser.changePassword("newpass");\r
                assertTrue(TestUser.checkPassword("newpass"));\r
@@ -46,6 +48,7 @@ public class UserTest {
        \r
        @Test\r
        public void setMailTest() {\r
+               TestUser = new User("TestUser","pass");\r
                String goodMail = "grosm9@bfh.ch";\r
                String wrongMail1 = "ioajfd.ch";\r
                String wrongMail2 = "asjdfh@fds";\r
@@ -57,6 +60,7 @@ public class UserTest {
        \r
        @Test\r
        public void getMailTest() {\r
+               TestUser = new User("TestUser","pass");\r
                String mail = "grosm9@bfh.ch";\r
                \r
                TestUser.setMail(mail);\r
@@ -65,12 +69,14 @@ public class UserTest {
 \r
        @Test\r
        public void setAndGetNameTest() {\r
+               TestUser = new User("TestUser","pass");\r
                TestUser.setName("Tester");\r
                assertEquals("Tester",TestUser.getName());\r
        }\r
        \r
        @Test\r
        public void setAndGetLastnameTest() {\r
+               TestUser = new User("TestUser","pass");\r
                TestUser.setLastname("Dummy");\r
                assertEquals("Dummy", TestUser.getLastname());\r
        }\r