package com.twu.biblioteca.entity;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class UserTest {
    private User user;

    @Before
    public void initUser() {
        user = new User();
    }

    @Test
    public void canSetUserNameTest() {
        user.setName("zhzhang");
        assertEquals("zhzhang", user.getName());
    }

    @Test
    public void canSetUserPasswordTest() {
        user.setPassword("1111");
        assertEquals("1111", user.getPassword());
    }

    @Test
    public void canSetUserTypeTest() {
        user.setType("customer");
        assertEquals("customer", user.getType());

    }
}

@@ -662,16 +662,273 @@
 ype());%0A
+    %7D%0A%0A    @Test%0A    public void constructorTest() %7B%0A        user = new User(%22zhzhang%22, %221111%22, %22customer%22);%0A        assertEquals(%22zhzhang%22, user.getName());%0A        assertEquals(%221111%22, user.getPassword());%0A        assertEquals(%22customer%22, user.getType());
 %0A    %7D%0A%7D

complete user entity constructor class