Finished Task 1
This commit is contained in:
parent
9548c87325
commit
d8470790b2
@ -63,7 +63,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
\def\name{[Add name here]}
|
\def\name{Michael Chen}
|
||||||
\def\group{\textit{Assigned in Phase 1}}
|
\def\group{\textit{Assigned in Phase 1}}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
@ -75,7 +75,9 @@
|
|||||||
\begin{question}{Learn to Understand given JUnit Tests}%[0]
|
\begin{question}{Learn to Understand given JUnit Tests}%[0]
|
||||||
From the \texttt{src/test/java} folder, select 2 test files, and describe in your own words which parts of the system / program execution are tested, and which kind of failures may be targeted by these tests.
|
From the \texttt{src/test/java} folder, select 2 test files, and describe in your own words which parts of the system / program execution are tested, and which kind of failures may be targeted by these tests.
|
||||||
\begin{answer}
|
\begin{answer}
|
||||||
[TODO: Add answer here]
|
The \texttt{nl.tudelft.jpacman.npc.ghost.NavigationTest} class contains 8 test cases that test the capabilities of the \texttt{Navigation} class which is used to navigate the 2D maps and find paths to specific squares or types of objects. There are several test cases that verify the correct behaviour of the navigator: it checks if the navigator can find a correct path between to spaces, it verifies the correct failure return value in case no path can be found, it verifies that nearby objects of specific types can be found and also that certain navigator objects (ghosts, players, null) will navigate terrain differently (null can pass through wall squares). Each test consists of three steps: the preparation step parses a map from a list of lines in the grid and creates the squares that shall be navigated or objects to be found, the execution step then runs the navigation module with the test parameters, and finally the assertion step verifies the correctness of the execution results.
|
||||||
|
|
||||||
|
The \texttt{nl.tudelft.jpacman.board.OccupantTest} class contains a couple of tests that verify the correct behaviour of the occupancy protocol of the squares and units. The game rules define a strict 0..1 to 0..1 relation between those objects: each square can be occupied by at most one unit and each unit can occupy at most one square at a time. The tests here check if the relationship \textbf{on both sides} is successfully established once the unit tries to occupy a square that is accessible to the unit. It also checks that the square can be safely occupied multiple times.
|
||||||
\end{answer}
|
\end{answer}
|
||||||
\end{question}
|
\end{question}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user