package no.priv.bang.ukelonn.impl;

import static org.junit.Assert.*;

import org.junit.Test;

public class AdminUserTest {

    @Test
    public void testEquals() {
        AdminUser user = new AdminUser("jad", 1, 1, "Jane", "Doe");
        AdminUser userDifferentAdministratorId = new AdminUser("jad", 1, 2, "Jane", "Doe");
        assertNotEquals(user, userDifferentAdministratorId);
        AdminUser userDifferentUserId = new AdminUser("jad", 2, 1, "Jane", "Doe");
        assertNotEquals(user, userDifferentUserId);
        AdminUser userDifferentUsername = new AdminUser("jadd", 1, 1, "Jane", "Doe");
        assertNotEquals(user, userDifferentUsername);
        AdminUser userDifferentFirstname = new AdminUser("jad", 1, 1, "Julie", "Doe");
        assertNotEquals(user, userDifferentFirstname);
        AdminUser userDifferentLastname = new AdminUser("jad", 1, 1, "Jane", "Deer");
        assertNotEquals(user, userDifferentLastname);
        AdminUser equalUser = new AdminUser("jad", 1, 1, "Jane", "Doe");
        assertEquals(user, equalUser);
        assertEquals(user, user);
        AdminUser userWithNullStrings = new AdminUser(null, 1, 1, null, null);
        assertNotEquals(userWithNullStrings, user);
        assertNotEquals(user, null);
        assertNotEquals(user, "");
    }

}

@@ -1293,10 +1293,785 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void testHashCode() %7B%0A        AdminUser user = new AdminUser(%22jad%22, 1, 1, %22Jane%22, %22Doe%22);%0A        assertEquals(-66719528, user.hashCode());%0A        AdminUser userWithNullStrings = new AdminUser(null, 1, 1, null, null);%0A        assertEquals(29552703, userWithNullStrings.hashCode());%0A    %7D%0A%0A    @Test%0A    public void testToString() %7B%0A        AdminUser user = new AdminUser(%22jad%22, 1, 1, %22Jane%22, %22Doe%22);%0A        assertEquals(%22AdminUser %5BuserName=jad, userId=1, administratorId=1, firstname=Jane, surname=Doe%5D%22, user.toString());%0A        AdminUser userWithNullStrings = new AdminUser(null, 1, 1, null, null);%0A        assertEquals(%22AdminUser %5BuserName=null, userId=1, administratorId=1, firstname=null, surname=null%5D%22, userWithNullStrings.toString());%0A    %7D%0A%0A
 %7D%0A

Add tests for bean AdminUser.