Fixed Error in CarTest.java #20
			
				
			
		
		
		
	| 
						 | 
				
			
			@ -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)));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue