package nuclibooktest.models;

import org.junit.After;
import org.junit.Before;

import static org.junit.Assert.*;

public class StaffTest {

    @Before
    public void setUp() throws Exception {

    }

    @After
    public void tearDown() throws Exception {

    }
}
@@ -35,236 +35,2930 @@
 ort 
-org.junit.After;%0Aimport org.junit.Before;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class StaffTest %7B%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A%0A    %7D%0A%0A    @After%0A    public void tearDown() throws Exception %7B%0A
+com.j256.ormlite.dao.Dao;%0Aimport com.j256.ormlite.dao.DaoManager;%0Aimport com.j256.ormlite.support.ConnectionSource;%0Aimport nuclibook.models.CannotHashPasswordException;%0Aimport nuclibook.models.Staff;%0Aimport nuclibook.models.Tracer;%0Aimport nuclibooktest.test_utils.TestSqlServerConnection;%0Aimport org.junit.*;%0A%0Aimport java.sql.SQLException;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class StaffTest %7B%0A%0A    @Test%0A    public void setAndCheckPasswordTest() throws SQLException, CannotHashPasswordException %7B%0A        Staff staff = new Staff();%0A        staff.setPassword(%22foobar%22);%0A        assertTrue(%22Password check failed for set password 'foobar'%22, staff.checkPassword(%22foobar%22));%0A    %7D%0A%0A    @Test%0A    public void isInLastPasswordsTest() throws CannotHashPasswordException %7B%0A        Staff staff = new Staff();%0A%0A        staff.setPassword(%22foobar%22);%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar%22));%0A%0A        staff.setPassword(%22foobar2%22);%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar%22));%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar2%22));%0A%0A        staff.setPassword(%22foobar3%22);%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar%22));%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar2%22));%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar3%22));%0A%0A        staff.setPassword(%22foobar4%22);%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar%22));%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar2%22));%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar3%22));%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar4%22));%0A%0A        staff.setPassword(%22foobar5%22);%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar2%22));%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar3%22));%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar4%22));%0A        assertTrue(%22isInLastPasswords() returned false when it should have returned true%22, staff.isInLastPasswords(%22foobar5%22));%0A        assertFalse(%22isInLastPasswords() returned true when it should have returned false%22, staff.isInLastPasswords(%22foobar%22));
 %0A    %7D%0A
+%0A
 %7D

Add password unit tests for staff model