import at.reisinger.obj.*;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;


public class UserTest {
    private User user;

    @BeforeEach
    void setUp() {
        Coins coins = new Coins(10);
        Credentials credentials = new Credentials("username", "pw");
        user = new User(credentials, "name", "nachname", "email", coins, "BIO", "IMAGE");
    }
    @Test
    public void test_getName() {
        String result = user.getName();
        assertEquals(result, "name");
    }
    @Test
    public void test_getNachname() {
        String result = user.getNachname();
        assertEquals(result, "nachname");
    }
    @Test
    public void test_getEmail() {
        String result = user.getEmail();
        assertEquals(result, "email");
    }

    @Test
    public void test_setName() {
        String newstring = "new";
        user.setName(newstring);
        String result = user.getName();
        assertEquals(newstring, result);
    }
    @Test
    public void test_setNachname() {
        String newstring = "new";
        user.setNachname(newstring);
        String result = user.getNachname();
        assertEquals(newstring, result);
    }
    @Test
    public void test_setEmail() {
        String newstring = "new";
        user.setEmail(newstring);
        String result = user.getEmail();
        assertEquals(newstring, result);
    }
}
