示例#1
0
 @Test
 public void testButtonFixedMore() {
   final ButtonFixedMore button = new ButtonFixedMore(menu);
   final int a = menu.getFixedChips();
   button.doClick();
   assertTrue(a < menu.getFixedChips());
 }
示例#2
0
 @Test
 public void testButtonBotsMore() {
   ButtonBotsMore button = new ButtonBotsMore(menu);
   final int a = menu.getBotsCount();
   button.doClick();
   assertTrue(a < menu.getBotsCount());
 }
示例#3
0
 @Test
 public void testButtonChipsMore() {
   final ButtonChipsMore button = new ButtonChipsMore(menu);
   final int a = menu.getChipsAmount();
   button.doClick();
   assertTrue(a < menu.getChipsAmount());
 }
示例#4
0
 @Test
 public void testButtonFixedRaiseMore() {
   final ButtonFixedRaiseMore button = new ButtonFixedRaiseMore(menu);
   menu.setFixedRaise(3);
   final int a = menu.getFixedRaise();
   button.doClick();
   assertTrue(a < menu.getFixedRaise());
 }
示例#5
0
 @Test
 public void testButtonBotsLess() {
   final ButtonBotsLess button = new ButtonBotsLess(menu);
   menu.setBotsCount(2);
   final int a = menu.getBotsCount();
   button.doClick();
   assertTrue(a > menu.getBotsCount());
 }
示例#6
0
 @Test
 public void testButtonPlayersMore() {
   final ButtonPlayersMore button = new ButtonPlayersMore(menu);
   menu.setPlayersCount(5);
   final int a = menu.getPlayersCount();
   button.doClick();
   assertTrue(a < menu.getPlayersCount());
 }
示例#7
0
 @Test
 public void testPlayersLess() {
   final ButtonPlayersLess button = new ButtonPlayersLess(menu);
   menu.setPlayersCount(5);
   final int a = menu.getPlayersCount();
   button.doClick();
   assertTrue(a > menu.getPlayersCount());
 }
示例#8
0
 @Test
 public void testButtonBlindLess() {
   final ButtonBlindLess button = new ButtonBlindLess(menu);
   menu.setBlindAmount(50);
   final int a = menu.getBlindAmount();
   button.doClick();
   assertTrue(a > menu.getBlindAmount());
 }
示例#9
0
 @Test
 public void testButtonLimit() {
   final ButtonStrategy strategy = new ButtonStrategy(menu);
   final ButtonProperties prop = new ButtonProperties(menu);
   ButtonLimit buttonLimit = new ButtonLimit(menu, strategy);
   final String a = menu.getLimit();
   prop.doClick();
   buttonLimit.doClick();
   buttonLimit.doClick();
   buttonLimit.doClick();
   assertTrue(a.equals(menu.getLimit()));
 }
示例#10
0
  @Ignore // creating server in Junits throws exceptions
  public void testButtonServer() {
    try {
      final ButtonServer button = new ButtonServer(menu);
      button.doClick();
      assertNotNull(menu.getKryoServer());
    } catch (Exception e) {

    }
  }
示例#11
0
 @Test
 public void testButtonStrategy() {
   final ButtonStrategy button = new ButtonStrategy(menu);
   Strategy a = menu.getStrategy();
   menu.setLimit("no-limit");
   button.doClick();
   assertFalse(a.equals(menu.getStrategy()));
   a = menu.getStrategy();
   button.doClick();
   assertFalse(a.equals(menu.getStrategy()));
   a = menu.getStrategy();
   button.doClick();
   assertTrue(a == null);
   a = menu.getStrategy();
   button.doClick();
   assertFalse(a.equals(menu.getStrategy()));
   a = menu.getStrategy();
   button.doClick();
   assertFalse(a.equals(menu.getStrategy()));
   button.doClick();
   assertFalse(a.equals(menu.getStrategy()));
   button.doClick();
   assertFalse(a.equals(menu.getStrategy()));
   button.doClick();
   assertFalse(a == null);
   button.doClick();
   assertFalse(a.equals(menu.getStrategy()));
   menu.setLimit("fixed-limit");
   button.doClick();
   assertFalse(a.equals(menu.getStrategy()));
 }
示例#12
0
  @Test
  public void testMainMenu() {
    MainMenu.main(null);

    assertNotNull(menu);
  }
示例#13
0
 @Test
 public void testButtonProperties() {
   final ButtonProperties button = new ButtonProperties(menu);
   button.doClick();
   assertNotNull(menu.getProperties());
 }