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 CreatePolylineTest2_With2Points() { 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(); }
public void NewShapeForCancasTest3() { 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(); CanvasBUS.NewShapeForCancas(shapeBUS.Shapes[0] as PolylineShape); }
public void CreatePolylineTest_With1Points() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.CreatePolyline(); }