mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-03-03 16:49:45 +01:00
More tests for equals.
This commit is contained in:
parent
27250fffec
commit
cd8905abd9
@ -10,12 +10,17 @@ public class PositionTest {
|
|||||||
private Position testPosition2;
|
private Position testPosition2;
|
||||||
private Position testPosition3;
|
private Position testPosition3;
|
||||||
private Position testPosition4;
|
private Position testPosition4;
|
||||||
|
private Position testPosition5;
|
||||||
|
private Position testPosition6;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
testPosition1 = new Position(3, 4);
|
testPosition1 = new Position(3, 4);
|
||||||
testPosition2 = new Position(2, 3);
|
testPosition2 = new Position(2, 3);
|
||||||
testPosition3 = new Position(3, 4);
|
testPosition3 = new Position(3, 4);
|
||||||
testPosition4 = new Position(3, 3);
|
testPosition4 = new Position(3, 3);
|
||||||
|
testPosition5 = new Position(1, 4);
|
||||||
|
testPosition6 = new Position(3, 3);
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testGetXPosition(){
|
public void testGetXPosition(){
|
||||||
@ -32,4 +37,10 @@ public class PositionTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDifferentPositionsAreNotEqual() { assertNotEquals(testPosition2, testPosition4);}
|
public void testDifferentPositionsAreNotEqual() { assertNotEquals(testPosition2, testPosition4);}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void equalXandDifferentYIsNotEqual() { assertNotEquals(testPosition1, testPosition6);}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void equalYandDifferentYXIsNotEqual() { assertNotEquals(testPosition1, testPosition5);}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user