Пример #1
0
 public void ShiftInLocalSystem()
 {
     var ls = new LocalSystem();
     var ss = new StarShip();
     ls.Place(ss, new PointF(1, 2));
     ls.Shift(ss, new PointF(10, 100));
     var crd = ls.Resolve(ss);
     Assert.AreEqual(crd, new PointF(11, 102));
     ls.Shift(ss, new PointF(1, -10));
     crd = ls.Resolve(ss);
     Assert.AreEqual(crd, new PointF(12, 92));
 }
Пример #2
0
 public void PlaceinLocalSystem()
 {
     var ls = new LocalSystem();
     var ss = new StarShip();
     ls.Place(ss, new PointF(1, 2));
     var crd = ls.Resolve(ss);
     Assert.AreEqual(crd, new PointF(1, 2));
     ls.Remove(ss);
     Assert.IsFalse(ls.Contains(ss));
     ls.Place(ss, new PointF(6, 8));
     crd = ls.Resolve(ss);
     Assert.AreEqual(crd, new PointF(6, 8));
 }