created User class
[staff/due1/sed-hs15-srs-purple.git] / src / test / java / ch / bfh / ti / srs / core / UserTest.java
CommitLineData
7f912ebe
M
1/*\r
2 * Copyright (c) 2015 Berner Fachhochschule, Switzerland.\r
3 *\r
4 * Project Smart Reservation System.\r
5 *\r
6 * Distributable under GPL license. See terms of license at gnu.org.\r
7 */\r
8package ch.bfh.ti.srs.core;\r
9\r
10import static org.junit.Assert.*;\r
11\r
12import java.util.Set;\r
13\r
14import org.junit.BeforeClass;\r
15import org.junit.Test;\r
16\r
17public class UserTest {\r
18 private Set<User> userList = new Set<>();\r
19 User TestUser;\r
20 \r
21 @BeforeClass\r
22 public static void setUpBeforeClass() throws Exception {\r
23 \r
24 }\r
25\r
26 @Test\r
27 public void CreateUserTest() {\r
28 TestUser = new User(TestUser,"1234");\r
29 assertEquals("TestUser", TestUser.getUserName());\r
30 }\r
31 \r
32 @Test\r
33 public void CheckPasswordTest() {\r
34 assertTrue(TestUser.checkPassword("1234"));\r
35 assertFalse(TestUser.checkPassword("4321"));\r
36 }\r
37\r
38}\r