Fixed Error in CarTest.java #20

Merged
schrom01 merged 9 commits from car into main 2022-03-10 14:51:27 +01:00
1 changed files with 60 additions and 0 deletions
Showing only changes of commit 381ea44a9a - Show all commits

View File

@ -0,0 +1,60 @@
package ch.zhaw.pm2.racetrack;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class CarTest {
Car car;
@BeforeEach
void setUp() {
car = new Car('a', new PositionVector(10, 10));
}
@AfterEach
void tearDown() {
}
@Test
void setPosition() {
car.setPosition(new PositionVector(20, 20));
checkPosition(20, 20);
}
@Test
void nextPosition() {
checkPosition(10, 10);
}
@Test
void accelerate() {
}
@Test
void move() {
}
@Test
void crash() {
}
@Test
void isCrashed() {
}
@Test
void setMoveStrategy() {
}
@Test
void getMoveStrategy() {
}
void checkPosition(int x, int y) {
assertTrue(car.nextPosition().equals(new PositionVector(x, y)));
}
}