示例#1
0
 public void SelectionTest()
 {
     PointEditor pointMutator = new PointEditor(null, null, sampleFeature, GetStyle(Pens.Red));
     ITrackerFeature tracker = pointMutator.GetTrackerByIndex(0);
     // The tracker has focus by default; is this ok
     Assert.AreEqual(true, tracker.Selected);
     pointMutator.Select(tracker, false);
     Assert.AreEqual(false, tracker.Selected);
 }
示例#2
0
        public void PointMutatorCreationWithoutMapControlTest()
        {
            PointEditor pointMutator = new PointEditor(null, null, sampleFeature, GetStyle(Pens.Red));
            Assert.AreEqual(null, pointMutator.TargetFeature);
            Assert.AreNotEqual(null, pointMutator.SourceFeature);
            // The tracker has focus by default; is this ok
            IList<ITrackerFeature> trackers = pointMutator.GetFocusedTrackers();
            Assert.AreEqual(1, trackers.Count);

            ITrackerFeature tracker = pointMutator.GetTrackerByIndex(0);
            Assert.AreNotEqual(null, tracker);

            pointMutator.Start();
            Assert.AreNotEqual(null, pointMutator.TargetFeature);
            Assert.AreNotEqual(pointMutator.SourceFeature, pointMutator.TargetFeature);
        }