package com.thoughtworks.biblioteca;

import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;

public class UserTest {

    @Test
    public void shouldBeDifferentIfTheyHaveSameUserNameAndDifferentPassword() {
        User user1 = new User("123-1234","xhy");
        User user2 = new User("123-1234","xyz");
        assertNotEquals(user1, user2);
    }

    @Test
    public void shouldBeDifferentIfTheyHaveDifferentUserNameAndSamePassword() {
        User user1 = new User("123-1334","xyz");
        User user2 = new User("123-1234","xyz");
        assertNotEquals(user1, user2);
    }

    @Test
    public void shouldBeDifferentIfTheyHaveDifferentUserNameAndDifferentPassword() {
        User user1 = new User("123-1334","xhz");
        User user2 = new User("123-1234","xyz");
        assertNotEquals(user1, user2);
    }

    @Test
    public void shouldBeSameIfTheyHaveSameUserNameAndPassword() {
        User user1 = new User("123-1234","xyz");
        User user2 = new User("123-1234","xyz");
        assertEquals(user1, user2);
    }

    @Test
    public void shouldReturnTrueIfLibrarian() {
        User user1 = new User("123-4567","jhalaa");
        assertTrue(user1.isLibraian());
    }
}

@@ -90,111 +90,9 @@
 ert.
-assertEquals;%0Aimport static org.junit.Assert.assertNotEquals;%0Aimport static org.junit.Assert.assertTrue
+*
 ;%0A%0Ap
@@ -1194,11 +1194,173 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void shouldReturnFalseIfNotLibrarian() %7B%0A        User user1 = new User(%22123-4537%22,%22jhalaa%22);%0A        assertFalse(user1.isLibraian());%0A    %7D
 %0A%7D%0A

must return false if user is not librarian