package ca.mokhan.test; import Q8.*; import java.io.*; import java.text.*; import java.util.*; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; public class BadmintonScoringTest extends TestCase { private BadmintonScoring subject; private int[][] scores = { {0, 0}, {1, 0}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {2, 5}, {3, 5}, {4, 5}, {4, 6}, {4, 7}, {4, 8}, {4, 9}, {4, 10}, {4, 11}, {4, 12}, {4, 13}, {4, 14}, {4, 15}, {5, 15}, {5, 16}, {5, 17}, {5, 18}, {5, 19}, {5, 20}, {5, 21}, }; public BadmintonScoringTest(String testName) { super(testName); this.subject = new BadmintonScoring(this.scores); } public static Test suite() { return new TestSuite(BadmintonScoringTest.class); } public void test_getPlayer1Points() { assertEquals(5, this.subject.getPlayer1Points()); } public void test_getPlayer2Points() { assertEquals(21, this.subject.getPlayer2Points()); } public void test_getContinuousPointsPlayer1() { assertEquals(2, this.subject.getContinuousPointsPlayer1()); } public void test_getContinuousPointsPlayer2() { assertEquals(9, this.subject.getContinuousPointsPlayer2()); } }