Merge remote-tracking branch 'origin/main'

This commit is contained in:
romanschenk37 2022-03-25 23:40:55 +01:00
commit 1addc2a6d5
1 changed files with 14 additions and 11 deletions

View File

@ -14,7 +14,9 @@ import java.util.List;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.*;
/** /**
* Tests for Class Car * Class that contains all test for the Class Car
*
* @author Roman Schenk
*/ */
class CarTest { class CarTest {
@ -26,7 +28,7 @@ class CarTest {
final char DEFAULT_ID = 'f'; final char DEFAULT_ID = 'f';
/** /**
* Create a new Car Object and set Position to a defined Default Position * Creates a new Car Object and set Position to a defined Default Position
*/ */
@BeforeEach @BeforeEach
void setUp() { void setUp() {
@ -34,7 +36,7 @@ class CarTest {
} }
/** /**
* Checks getID * Checks if the method getID returns the correct value
*/ */
@Test @Test
void getID() { void getID() {
@ -52,8 +54,8 @@ class CarTest {
} }
/** /**
* - checks if the position of the car can be set and saved correctly with valid positions. * Checks if the position of the car can be set and saved correctly with valid positions.
* - checks if an exception is thrown and position keeps unchanged if invalid coordinates are entered. * Checks if an exception is thrown and position kept unchanged if invalid coordinates are entered.
*/ */
@Test @Test
void setPosition() { void setPosition() {
@ -159,7 +161,8 @@ class CarTest {
/** /**
* test for methods crash and isCrashed. checks if state crashed is set and returned correctly. * Test for methods crash and isCrashed.
* Checks if state crashed is set and returned correctly.
*/ */
@Test @Test
void crash() { void crash() {
@ -169,8 +172,8 @@ class CarTest {
} }
/** /**
* test for methods setMoveStrategy. Checks if the MoveStrategy Object is saved and returned correctly * Test for methods setMoveStrategy.
* with all Types of MoveStrategy. * Checks if the MoveStrategy Object is saved and returned correctly with all Types of MoveStrategy.
*/ */
@Test @Test
void MoveStrategy() { void MoveStrategy() {
@ -202,7 +205,7 @@ class CarTest {
} }
/** /**
* Test for get WinPoints * Tests if getWinPoints returns the correct value.
*/ */
@Test @Test
void getWinPoints() { void getWinPoints() {
@ -210,7 +213,7 @@ class CarTest {
} }
/** /**
* Test for increase WinPoints * Tests if winpoints increase functions properly.
*/ */
@Test @Test
void increaseWinPoints() { void increaseWinPoints() {
@ -219,7 +222,7 @@ class CarTest {
} }
/** /**
* Test for deduct WinPoints * Tests if the deductions of winpoints functions properly.
*/ */
@Test @Test
void deductWinPoints() { void deductWinPoints() {