public void FigureNDCreateFigureTest() { FigureNDIFabric figureNDFabric = new FigureNDIFabric(); AFigure actual = figureNDFabric.CreateFigure(new Pen(Color.Black, 5)); Assert.AreEqual(typeof(FigureNDIFigure), actual.GetType()); }
public void MouseDown(Pen p, MouseEventArgs e, AFigure figure, IFigureFabric fabric) { _singletone = SingletonData.GetData(); foreach (AFigure checkFigure in _singletone.FigureList) { if (checkFigure.IsEdge(e.Location)) { _figure = checkFigure; _movingFigure = checkFigure; _singletone.FigureList.Remove(_figure);//это удаление первой по значению? _figure.AddPeak(); fabric = new FigureNDIFabric(); _figure = fabric.CreateFigure(p); _singletone.PictureBox1.Image = _singletone.Canvas.Clear(); foreach (AFigure figureINList in _singletone.FigureList) { _singletone.PictureBox1.Image = _singletone.Canvas.DrawIt(figureINList, new Pen(figureINList.Color, figureINList.Width)); _singletone.Canvas.Save(); } _startPoint = checkFigure.TouchPoint; } } }