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

public class OddsAndEventsTest {

    OddsAndEvensMethods oNEM = new OddsAndEvensMethods(0,0);
    @Before
    public void setup(){

    }


    @Test
    public void getOddNumsTest(){

        // Given
        int [] arr = {5,6,7,8,9};
        //When

        int  actual =  oNEM.getOddNums(arr);

        //Then

        Assert.assertEquals(3,oNEM.odds);


    }


    @Test
    public void getOddNumsTest2(){

        // Given
        int [] arr = {5,0,7,8,9};
        //When

        int  actual = oNEM.getOddNums(arr);

        //Then

        Assert.assertEquals(3,actual);


    }

    @Test
    public void getEvenNumsTest(){

        // Given
        int [] arr = {5,1,7,8,9,4};
        //When

        int  actual = oNEM.getEvensNums(arr);

        //Then

        Assert.assertEquals(2,actual);


    }
    @Test
    public void getEvenNumsTestZeroSnuckIn(){

        // Given
        int [] arr = {5,1,7,8,9,4,0,0,0};
        //When

        int  actual = oNEM.getEvensNums(arr);

        //Then

        Assert.assertEquals(2,actual);


    }


}
