SHARE
TWEET

Untitled

a guest May 22nd, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     @Test
  2.     @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
  3.     public void levelUp(){
  4.         //set up two users
  5.         Map<String,String> map = this.setUpTwoUsers();
  6.  
  7.         //created a game & set players
  8.         Game newGame = this.createGameAndSetPlayers(map.get("ownerToken"),map.get("opponentToken"));
  9.  
  10.         newGame.getField().getBuilding(1,1).setLevel(2);
  11.         newGame.getField().getBuilding(1,1).levelUp();
  12.         Assert.assertFalse(newGame.getField().getBuilding(1, 1).isBlocked());
  13.         Assert.assertEquals(newGame.getField().getBuilding(1,1).getLevel(), 3);
  14.  
  15.         newGame.getField().getBuilding(1,1).levelUp();
  16.         Assert.assertTrue(newGame.getField().getBuilding(1,1).isBlocked());
  17.  
  18.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top