webidor/src/test/java/cz/xelfi/quoridor/webidor/QuoridorTest.java
branchstatistics-and-elo
changeset 178 4b78d4f028b3
parent 145 ac9bd9be5263
child 179 c5fbddc4c590
     1.1 --- a/webidor/src/test/java/cz/xelfi/quoridor/webidor/QuoridorTest.java	Sat Nov 07 23:26:03 2009 +0100
     1.2 +++ b/webidor/src/test/java/cz/xelfi/quoridor/webidor/QuoridorTest.java	Thu Jan 07 22:34:17 2010 +0100
     1.3 @@ -201,14 +201,17 @@
     1.4  
     1.5          class GMap extends GenericType<Map<String,Object>>{}
     1.6          String text = webResource.path("games").path(s.getId()).accept(MediaType.TEXT_PLAIN).get(String.class);
     1.7 +        text = (new Board(text)).boardToPicture();
     1.8          if (text.indexOf("-----") == -1) {
     1.9              fail("Expecting board:\n" + text);
    1.10          }
    1.11          Game readGame = webResource.path("games").path(s.getId()).accept(MediaType.TEXT_XML).get(Game.class);
    1.12          String sGame = webResource.path("games").path(s.getId()).accept(MediaType.TEXT_XML).get(String.class);
    1.13          assertNotNull("Game really returned", readGame);
    1.14 -        assertEquals("Same game as in text representation", readGame.getBoard(), Board.valueOf(text));
    1.15 -        assertEquals("It is same as text of our game", readGame.getBoard().toString(), text);
    1.16 +//        assertEquals("Same game as in text representation", readGame.getBoard(), Board.valueOf(text));
    1.17 +        assertEquals("Same game as in text representation", readGame.getBoard(), Board.picture2board(text));
    1.18 +//        assertEquals("It is same as text of our game", readGame.getBoard().toString(), text);
    1.19 +        assertEquals("It is same as text of our game", readGame.getBoard().boardToPicture(), text);
    1.20  
    1.21          assertEquals(Move.NORTH, readGame.getMoves().get(0).getMove());
    1.22          assertEquals(Move.SOUTH, readGame.getMoves().get(1).getMove());