コード例 #1
0
 @Test
 public void testEqualsTransitivitySomePosition() {
   TemplatePosition posX = TemplatePosition.createTemplatePosition(2, 4, 25);
   TemplatePosition posY = TemplatePosition.createTemplatePosition(2, 4, 25);
   TemplatePosition posZ = TemplatePosition.createTemplatePosition(2, 4, 25);
   assertTrue(posX.equals(posY));
   assertTrue(posY.equals(posZ));
   assertTrue(posX.equals(posZ));
 }
コード例 #2
0
 @Test
 public void testEqualsDiffPositionsLine() {
   TemplatePosition posX = TemplatePosition.createTemplatePosition(3, 4, 25);
   TemplatePosition posY = TemplatePosition.createTemplatePosition(2, 4, 25);
   assertFalse(posX.equals(posY));
   assertFalse(posY.equals(posX));
 }
コード例 #3
0
 @Test
 public void testEqualsSymmetrySomePosition() {
   TemplatePosition posX = TemplatePosition.createTemplatePosition(2, 4, 25);
   TemplatePosition posY = TemplatePosition.createTemplatePosition(2, 4, 25);
   assertTrue(posX.equals(posY));
   assertTrue(posY.equals(posX));
 }
コード例 #4
0
 @Test
 public void testEqualsSymmetryInitialPosition() {
   TemplatePosition posX = TemplatePosition.createInitialPosition();
   TemplatePosition posY = TemplatePosition.createInitialPosition();
   assertTrue(posX.equals(posY));
   assertTrue(posY.equals(posX));
 }
コード例 #5
0
 @Test
 public void testEqualsForNullsSomePosition() {
   TemplatePosition pos1 = TemplatePosition.createTemplatePosition(2, 4, 25);
   assertFalse(pos1.equals(null));
 }
コード例 #6
0
 @Test
 public void testEqualsReflexivtiySomePosition() {
   TemplatePosition pos1 = TemplatePosition.createTemplatePosition(2, 4, 25);
   assertTrue(pos1.equals(pos1));
 }
コード例 #7
0
 @Test
 public void testEqualsReflexivtiyInitialPosition() {
   TemplatePosition pos1 = TemplatePosition.createInitialPosition();
   assertTrue(pos1.equals(pos1));
 }