public void getSelectTest() { MyDropdown dropdown = new MyDropdownDebug(); dropdown.add("a", 10); Assert.AreEqual(dropdown.getSelect(), 10); }
public void setMyItemListTest() { game.Game gm = game.GameTest.createGame(); MidnightSub sub = new MidnightSub(); game.GameTest.setItem(gm, "p1", ITEM.MURDERE_KNIFE, ITEM.KNIFE, ITEM.KNIFE, ITEM.KNIFE); game.GameTest.setItem(gm, "p2", ITEM.CHEAN_LOCK, ITEM.CHEAN_LOCK, ITEM.CHEAN_LOCK, ITEM.CHEAN_LOCK); MyDropdown drop = new MyDropdownDebug(); sub.setMyItemList(drop, 0, GameFactory.getGame().shareData.players.getPlayer(2), true, 12, 13, 21, 22); Assert.AreEqual(drop.items.Count, 1); Assert.AreEqual(drop.option[0], 10); Assert.AreEqual(drop.getSelect(), 10); sub.setMyItemList(drop, 1, GameFactory.getGame().shareData.players.getPlayer(2), true, 12, 13, 21, 22); Assert.AreEqual(drop.items.Count, 5); Assert.AreEqual(drop.option[0], 11); Assert.AreEqual(drop.option[1], 20); Assert.AreEqual(drop.option[2], 21); Assert.AreEqual(drop.option[3], 22); Assert.AreEqual(drop.option[4], 23); Assert.AreEqual(drop.getSelect(), 11); sub.setMyItemList(drop, 2, GameFactory.getGame().shareData.players.getPlayer(2), true, 12, 13, 21, 22); Assert.AreEqual(drop.items.Count, 5); Assert.AreEqual(drop.option[0], 12); Assert.AreEqual(drop.option[1], 20); Assert.AreEqual(drop.option[2], 21); Assert.AreEqual(drop.option[3], 22); Assert.AreEqual(drop.option[4], 23); Assert.AreEqual(drop.getSelect(), 12); sub.setMyItemList(drop, 3, GameFactory.getGame().shareData.players.getPlayer(2), true, 12, 13, 21, 22); Assert.AreEqual(drop.items.Count, 5); Assert.AreEqual(drop.option[0], 13); Assert.AreEqual(drop.option[1], 20); Assert.AreEqual(drop.option[2], 21); Assert.AreEqual(drop.option[3], 22); Assert.AreEqual(drop.option[4], 23); Assert.AreEqual(drop.getSelect(), 13); }