예제 #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());
 }