Example #1
0
 public Region(Location location, IHistoryManager<Region> historyManager = null)
 {
     Location = location;
     HistoryManager = historyManager;
     AfterAddBizEntity += new EventHandler<BizEntityEventArg>(DefaultAddBizEntityHandler);
     AfterRemoveBizEntity += new EventHandler<BizEntityEventArg>(DefaultRemoveBizEntityHandler);
 }
Example #2
0
 public void DestinationToTest()
 {
     Location target = new Location(1,2); // TODO: инициализация подходящего значения
     Location anotherLoc = new Location(4,7); // TODO: инициализация подходящего значения
     double expected = Math.Sqrt(34); // TODO: инициализация подходящего значения
     double actual;
     actual = target.DestinationTo(anotherLoc);
     Assert.AreEqual(expected, actual);
 }
Example #3
0
 public double DestinationTo(Location anotherLoc)
 {
     return Math.Sqrt(Math.Pow(X - anotherLoc.X, 2) + Math.Pow(Y - anotherLoc.Y, 2));
 }