@Before public void setUp() throws Exception { int[] tiles = { 1, 1, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 }; Tile last = M1; Hands hands = new Hands(tiles, last); List<Tile> dora = new ArrayList<>(1); dora.add(CHN); List<Tile> uradora = new ArrayList<>(1); uradora.add(M2); GeneralSituation general; general = new GeneralSituation(true, false, PEI, dora, uradora); PersonalSituation personal; personal = new PersonalSituation(true, false, false, false, false, false, NAN); player = new Player(hands, general, personal); player.calculate(); }
@Test public void testGetScore() throws Exception { assertEquals(SCORE32000, player.getScore()); }
@Test public void testGetFu() throws Exception { assertEquals(0, player.getFu()); }
@Test public void testGetYakumanListItem() throws Exception { List<Yakuman> actual = player.getYakumanList(); assertThat(actual, hasItems(CHIHO)); }
@Test public void testGetYakumanListSize() throws Exception { List<Yakuman> actual = player.getYakumanList(); assertEquals(1, actual.size()); }
@Test public void testGetNormalYaku() throws Exception { List<NormalYaku> actual = player.getNormalYakuList(); assertEquals(0, actual.size()); }