Initial Commit
This commit is contained in:
35
test/GamingAreaTest.java
Normal file
35
test/GamingAreaTest.java
Normal file
@@ -0,0 +1,35 @@
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class GamingAreaTest {
|
||||
|
||||
@Test
|
||||
void getPlayingField_returnsPlayingField_returnsArray() {
|
||||
|
||||
//Arrange
|
||||
GamingArea ga = new GamingArea(10,10);
|
||||
Position[][] playingField;
|
||||
|
||||
//Act
|
||||
playingField = ga.getPlayingField();
|
||||
|
||||
//Assert
|
||||
assertNotNull(playingField);
|
||||
}
|
||||
|
||||
@Test
|
||||
void validatePosition_checksPosition_returnsTrue() {
|
||||
|
||||
//Arrange
|
||||
GamingArea ga = new GamingArea(10,10);
|
||||
boolean expected = true;
|
||||
boolean actual;
|
||||
|
||||
//Act
|
||||
actual = ga.validatePosition(new Position(4,4));
|
||||
|
||||
//Assert
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user