ClosetTest.java 678 Bytes
Newer Older
Younis's avatar
Younis committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import org.junit.Test;
import static org.junit.Assert.*;

public class ClosetTest {

    @Test
    public void testCloset() {
        Closet myCloset = new MyCloset();
        Clothing sweater1 = new Clothing("Red", "M");
        Clothing sweater2 = new Clothing("Blue", "S");
        Clothing pants1 = new Clothing("Black", "L");
        Clothing pants2 = new Clothing("Blue", "S");

        myCloset.addClothing(sweater1);
        myCloset.addClothing(pants1);

        assertTrue(myCloset.hasClothing(sweater1));
        assertFalse(myCloset.hasClothing(sweater2));
        assertTrue(myCloset.hasClothing(pants1));
        assertFalse(myCloset.hasClothing(pants2));
    }
}