public void CreateEllipseTest_With1Points() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.CreateEllipse(); }
public void SaveShapesTest1() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 5)); shapeBUS.CreateEllipse(); shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 8)); shapeBUS.AddPoint(new Point(5, 4)); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.CreatePolygon(); shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(3, 50)); shapeBUS.CreatePolyline(); shapeBUS.AddPoint(new Point(5, 5)); shapeBUS.CreatePolyline(); shapeBUS.SaveShapes("test.xaml"); var fileText = File.ReadLines("test.xaml"); Assert.IsTrue(fileText.ToString().Length > 1); }
public void GetShapesTest1() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 5)); shapeBUS.CreateEllipse(); shapeBUS.GetShapes("dd.xaml"); }
public void NewShapeForCancasTest2() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 5)); shapeBUS.CreateEllipse(); CanvasBUS.NewShapeForCancas(shapeBUS.Shapes[0] as EllipseShape); }
public void ChooseShapeTest() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 6)); shapeBUS.CreateEllipse(); shapeBUS.ChooseShape("Ellipse 1"); int expected = 0; int actual = shapeBUS.ChoosenShapeIndex; Assert.AreEqual(expected, actual); }