コード例 #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));
 }