Ejemplo n.º 1
0
 public void BoundingBox_OverlapsOther_Partial_returnsTrue()
 {
     var bbLeftLow = new BoundingBox(100, 100, 200, 200);
      var bbRightHigh = new BoundingBox(150, 150, 250, 250);
      Assert.AreEqual(expected: true,
     actual: bbLeftLow.overlapsWith(bbRightHigh));
      Assert.AreEqual(expected: true,
     actual: bbRightHigh.overlapsWith(bbLeftLow));
 }
Ejemplo n.º 2
0
 public void BoundingBox_TotallyContainsOther_returnsTrue()
 {
     var bbBigUn = new BoundingBox(100, 100, 500, 500);
      var bbLittleUn = new BoundingBox(150, 150, 250, 250);
      Assert.AreEqual(expected: true,
     actual: bbBigUn.overlapsWith(bbLittleUn));
      Assert.AreEqual(expected: true,
     actual: bbLittleUn.overlapsWith(bbBigUn));
 }
Ejemplo n.º 3
0
 public void BoundingBox_NoOverlapOther_returnsFalse_case2()
 {
     var bbLeftLow = new BoundingBox(151, 151, 250, 250);
      var bbRightHigh = new BoundingBox(251, 51, 350, 150);
      Assert.AreEqual(expected: false,
     actual: bbLeftLow.overlapsWith(bbRightHigh));
      Assert.AreEqual(expected: false,
     actual: bbRightHigh.overlapsWith(bbLeftLow));
 }