Пример #1
0
 public void testCoordinatesHashCode() {
   Assert.assertEquals(coor32x16y.hashCode(), (new Coordinates(32, 16)).hashCode());
 }
Пример #2
0
 public void testCoordinatesDirection() {
   Assert.assertEquals(coor32x16y.direction(0), coor32x16y.up());
   Assert.assertEquals(coor32x16y.direction(1), coor32x16y.down());
   Assert.assertEquals(coor32x16y.direction(2), coor32x16y.left());
   Assert.assertEquals(coor32x16y.direction(3), coor32x16y.right());
 }
Пример #3
0
 public void testCoordinatesToString() {
   Assert.assertEquals(coor32x16y.toString(), "(32, 16)");
 }
Пример #4
0
 public void testCoordinatesLeft() {
   Assert.assertEquals(coor32x16y.left(), new Coordinates(31, 16));
 }
Пример #5
0
 public void testCoordinatesRight() {
   Assert.assertEquals(coor32x16y.right(), new Coordinates(33, 16));
 }
Пример #6
0
 public void testCoordinatesDown() {
   Assert.assertEquals(coor32x16y.down(), new Coordinates(32, 17));
 }
Пример #7
0
 public void testCoordinatesUp() {
   Assert.assertEquals(coor32x16y.up(), new Coordinates(32, 15));
 }
Пример #8
0
 public void testCoordinatesEquals() {
   Assert.assertTrue(!coor32x16y.equals(null));
   Assert.assertEquals(coor32x16y, coor32x16y);
   Assert.assertEquals(coor32x16y, new Coordinates(32, 16));
   Assert.assertTrue(!coor32x16y.equals(coor19x47y));
 }