Package it.polimi.ingsw.Server.Model
Class BoardTest
java.lang.Object
it.polimi.ingsw.Server.Model.BoardTest
Test of Board class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) void
checks if boardCards() returns the correct List of cards(package private) void
Verifies that initialization of unusable, three and for dots spaces is done as expected and checks for every possible space.(package private) boolean
CorrespondingListChecker
(List<Integer> l1, List<Integer> l2, int x, int y) Checks for couple matches on 2 given Integer lists.(package private) void
Empties the board and checks for limit reachability and management in generation of new Object Cards in end game conditions(package private) void
Verifies that initialization creates a non-empty board(package private) void
Checks if invalid moves are correctly recognized(package private) void
JSON Serialization Test(package private) void
outBoard()
Tests System.out of the Board, after each test(package private) void
restore()
Last taken cards restore test
-
Field Details
-
b
Board b
-
-
Constructor Details
-
BoardTest
public BoardTest()
-
-
Method Details
-
initialize
@Test void initialize()Verifies that initialization creates a non-empty board -
CorrespondingListChecker
Checks for couple matches on 2 given Integer lists.- Parameters:
l1
- list 1l2
- list 2x
- coordinatey
- coordinate- Returns:
- true if x and y are contained in first and second list respectively, in the same position
- Throws:
Exception
- when list sizes are different
-
correctSpaces
@Test void correctSpaces()Verifies that initialization of unusable, three and for dots spaces is done as expected and checks for every possible space. -
checkBoardCards
@Test void checkBoardCards()checks if boardCards() returns the correct List of cards -
invalidMoves
Checks if invalid moves are correctly recognized- Throws:
Exception
-
emptyBoard
Empties the board and checks for limit reachability and management in generation of new Object Cards in end game conditions- Throws:
Exception
-
restore
Last taken cards restore test- Throws:
Exception
-
JSONSerialization
JSON Serialization Test- Throws:
Exception
- related to Model Management
-
outBoard
Tests System.out of the Board, after each test- Throws:
RemoteException
-