public void AddPoint() { TaggerController taggerController = this.Container.GetInstance <TaggerController>(); taggerController.GetPoints(LabelName).Count.ShouldBe(0); taggerController.AddPoint(LabelName, new Point(42, 54)); taggerController.GetPoints(LabelName).Count.ShouldBe(1); taggerController.GetPoints(LabelName)[0].X.ShouldBe(42); taggerController.GetPoints(LabelName)[0].Y.ShouldBe(54); }
public void RemovePoint() { TaggerController taggerController = this.Container.GetInstance <TaggerController>(); taggerController.RemovePoint(string.Empty, new Point(1, 1)); taggerController.AddLabel(LabelName); taggerController.GetPoints(LabelName).Count.ShouldBe(0); taggerController.RemovePoint(LabelName, new Point(1, 1)); taggerController.AddPoint(LabelName, new Point(42, 54)); taggerController.GetPoints(LabelName).Count.ShouldBe(1); taggerController.GetPoints(LabelName)[0].X.ShouldBe(42); taggerController.GetPoints(LabelName)[0].Y.ShouldBe(54); taggerController.RemovePoint(LabelName, new Point(1, 1)); taggerController.GetPoints(LabelName).Count.ShouldBe(1); taggerController.RemovePoint(LabelName, new Point(42, 54)); taggerController.GetPoints(LabelName).Count.ShouldBe(0); }
public void SelectPixel() { IImageSource imageSource = this.Container.GetInstance <IImageSource>(); TaggerController taggerController = this.Container.GetInstance <TaggerController>(); taggerController.GetPoints(LabelName).Count.ShouldBe(0); taggerController.SelectPixel(null, Point.Empty); taggerController.GetPoints(LabelName).Count.ShouldBe(0); taggerController.AddLabel(LabelName); taggerController.SelectPixel(null, Point.Empty); taggerController.GetPoints(LabelName).Count.ShouldBe(0); taggerController.SelectLabel(LabelName); taggerController.SelectPixel(imageSource, new Point(42, 54)); taggerController.GetPoints(LabelName).Count.ShouldBe(1); taggerController.GetPoints(LabelName)[0].X.ShouldBe(42); taggerController.GetPoints(LabelName)[0].Y.ShouldBe(54); }