added the new program for holding known games

#stroy[1188]
This commit is contained in:
hba56
2017-08-29 12:57:19 +12:00
parent 7086af6057
commit 5b6b0a9978
7 changed files with 233 additions and 0 deletions
@@ -0,0 +1,27 @@
package model;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import static org.junit.Assert.assertEquals;
public class MatchTableTest {
private MatchTable testTable;
@Before
public void setUp() {
testTable = new MatchTable();
}
@Test
public void testTable() {
ArrayList entry = new ArrayList(Arrays.asList("127.0.0.1", 4942, 1, 1, 2, 6, 1));
testTable.addEntry(entry);
assertEquals(testTable.getMatchTable().get(new TableKey("127.0.0.1", 4942)), Arrays.asList(1, 1, 2, 6, 1));
}
}