1.1 --- a/quoridor/src/test/java/cz/xelfi/quoridor/BoardCase.java Thu Jan 07 22:34:17 2010 +0100
1.2 +++ b/quoridor/src/test/java/cz/xelfi/quoridor/BoardCase.java Thu Jan 07 22:51:17 2010 +0100
1.3 @@ -27,6 +27,8 @@
1.4
1.5 import cz.xelfi.quoridor.Fence.Orientation;
1.6 import cz.xelfi.quoridor.Player.Direction;
1.7 +import java.io.IOException;
1.8 +import java.io.StringReader;
1.9 import java.util.List;
1.10 import junit.framework.TestCase;
1.11
1.12 @@ -200,7 +202,7 @@
1.13 "\n" +
1.14 " [S] \n";
1.15
1.16 - b = Board.picture2board(b).toString();
1.17 + b = picture2board(b).toString();
1.18 Board begin = Board.valueOf(b);
1.19
1.20 try {
1.21 @@ -498,4 +500,8 @@
1.22 assertFalse(f4.equals(f5));
1.23 assertFalse(f3.equals(f5));
1.24 }
1.25 + static Board picture2board(String text) throws IOException, IllegalPositionException {
1.26 + StringReader sr = new StringReader(text);
1.27 + return Board.read(sr);
1.28 + }
1.29 }