package models;

import domain.entity.User;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;

public class UserTest {
    User user;

    @Before
    public void setUp() throws Exception {
        user = new User("Anton", "000");
    }

    @Test
    public void testGetName() throws Exception {
        assertEquals("Anton", user.getLogin());
    }

    @Test
    public void testSetName() throws Exception {
        user.setLogin("New one");
        assertEquals("New one", user.getLogin());
    }

    @Test
    public void testSetPasswordHash() throws Exception {
        String temp = user.getPasswordHash();
        user.setPasswordHash("111");
        assertNotEquals(temp, user.getPasswordHash());
    }

    @Test
    public void testCheckTrueUserPassword() throws Exception {
        user.checkPassword("000");
    }

    @Test
    public void testCheckFalseUserPassword() throws Exception {
        user.checkPassword("010");
    }

    @Ignore
    @Test
    public void testGetSHA256() throws Exception {

    }
}
@@ -882,32 +882,51 @@
 eption %7B%0A       
+ assertEquals(true,
  user.checkPassw
@@ -931,24 +931,25 @@
 sword(%22000%22)
+)
 ;%0A    %7D%0A%0A   
@@ -1022,24 +1022,44 @@
 on %7B%0A       
+ assertEquals(false,
  user.checkP
@@ -1072,16 +1072,17 @@
 d(%22010%22)
+)
 ;%0A    %7D%0A

The tests were tested