コード例 #1
0
  @Test
  public void testIsFirstSpaceTypeGo() {
    boolean didItFail = false;
    Board board = new Board();
    board.createListOfInitSpaces();

    Space space = new Space();
    space = board.getListOfSpaces().get(0);
    if (space.getSpaceType() != SpaceType.GO) {
      didItFail = true;
    }

    assertFalse(didItFail);
  }
コード例 #2
0
  @Test
  public void testBoardCreatesFortySpaces() {
    boolean didItFail = false;
    Board board = new Board();
    board.createListOfInitSpaces();

    ArrayList<Space> listOfSpaces = new ArrayList<>();
    listOfSpaces = board.createListOfInitSpaces();

    if (listOfSpaces.size() != 40) {
      didItFail = true;
      System.out.println("The number of spaces is " + listOfSpaces.size());
    }

    assertFalse(didItFail);
  }