public void CalculateDistance_ReturnDistanceBetweenTwoPoints() { try { #region Arrange double expected = 3; double actual = 0; GroupRecord group = new GroupRecord(); group.LocationX = 6; group.LocationY = 6; WellRecord well = new WellRecord(); well.TopX = 5; well.TopY = 3; #endregion #region Act actual = validateRecord.CalculateDistance(group.LocationX, group.LocationY, well.TopX, well.TopY); #endregion #region Assert Assert.IsTrue(actual > expected); #endregion } catch (Exception ex) { Assert.Fail(ex.Message); } finally { } }
public bool IsWellGroupChild(GroupRecord group, WellRecord well) { double distance = CalculateDistance(group.LocationX, group.LocationY, well.TopX, well.TopY); if (distance <= group.Radius) //well inside group { return(true); } return(false); }