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