Пример #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());
 }