Esempio n. 1
0
 @Test
 public void testButtonFixedMore() {
   final ButtonFixedMore button = new ButtonFixedMore(menu);
   final int a = menu.getFixedChips();
   button.doClick();
   assertTrue(a < menu.getFixedChips());
 }
Esempio n. 2
0
 @Test
 public void testButtonBotsMore() {
   ButtonBotsMore button = new ButtonBotsMore(menu);
   final int a = menu.getBotsCount();
   button.doClick();
   assertTrue(a < menu.getBotsCount());
 }
Esempio n. 3
0
 @Test
 public void testButtonChipsMore() {
   final ButtonChipsMore button = new ButtonChipsMore(menu);
   final int a = menu.getChipsAmount();
   button.doClick();
   assertTrue(a < menu.getChipsAmount());
 }
Esempio n. 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());
 }
Esempio n. 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());
 }
Esempio n. 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());
 }
Esempio n. 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());
 }
Esempio n. 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());
 }
Esempio n. 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()));
 }
Esempio n. 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) {

    }
  }
Esempio n. 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()));
 }
Esempio n. 12
0
  @Test
  public void testMainMenu() {
    MainMenu.main(null);

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