+/EE422C

software design

git clone https://git.julia.blue/+/EE422C

Joseph RyanAdd the rest of the files7e47727

master
781 B33 linesraw
1/*
2 * Phase A <studentA EID><studentB EID>
3 * Phase B <studentB EID><studentA EID>
4 */
5
6package pmap.phasea;
7
8import org.junit.Test;
9import static org.junit.Assert.assertEquals;
10import static org.junit.Assert.assertTrue;
11
12public class PMapTest {
13
14    @Test
15    public void testPut() {
16        PMap m = new PMap();
17        assertTrue(m.isEmpty());
18        assertEquals(null, m.put(1, 2));
19        assertEquals(1, m.size().intValue());
20        assertEquals(2, m.put(1, 3).intValue());
21        assertEquals(1, m.size().intValue());
22    }
23
24    @Test
25    public void testGet() {
26        PMap m = new PMap();
27        m.put(1, 2);
28        assertEquals(2, m.get(1).intValue());
29        assertEquals(null, m.get(2));
30    }
31
32    // TODO add more test cases to test all implemented methods
33}