package edu.uoc.prezmm.a1list2cook;

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

import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;

public class RegisterActivityTest {
    private RegisterActivity activity;


    @Before
    public void setUp() {
        activity = mock(RegisterActivity.class);
    }

    @Test
    //Comprova que el valor no estigui buit
    public void checkValuesTrue() {
        boolean result = activity.formCheckValue("User 01");
        assertEquals(true,result);
    }

    @Test
    //Comprova que el valor esta buit
    public void checkValuesFalse() {
        boolean result = activity.formCheckValue("");
        assertEquals(false,result);
    }

    @Test
    //Els dos valors coincideixen
    public void equalValuesTrue() {
        boolean result = activity.equalValues("pass01","pass01");
        assertEquals(true,result);
    }

    @Test
    //Els dos valors no coincideixen
    public void equalValuesFalse() {
        boolean result = activity.equalValues("pass01","pass02");
        assertEquals(false,result);
    }
}