improved test
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
package worms.model;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import worms.facade.Facade;
|
||||
import worms.facade.IFacade;
|
||||
import worms.model.Worm;
|
||||
import worms.util.ModelException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class PartialFacadeTest {
|
||||
|
||||
private static final double EPS = 1e-4;
|
||||
|
@@ -2,24 +2,32 @@ package worms.model;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import worms.util.Tuple;
|
||||
|
||||
class WormTest {
|
||||
|
||||
private Worm worm;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
|
||||
worm = new Worm(Tuple.create(0.0, 0.0), 0, "Test", 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
void getLocation() {
|
||||
|
||||
assertEquals(Tuple.create(0.0, 0.0), worm.getLocation());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getOrientation() {
|
||||
assertEquals(0, worm.getOrientation());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getRadius() {
|
||||
assertEquals(1, worm.getRadius());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user