public void CreatePentagonTest_With1Points() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.CreatePentagon(); }
public void GetShapesTest1() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 5)); shapeBUS.AddPoint(new Point(6, 5)); shapeBUS.AddPoint(new Point(9, 5)); shapeBUS.AddPoint(new Point(15, 5)); shapeBUS.CreatePentagon(); shapeBUS.GetShapes("testing.xaml"); }
public void FillShapeTest2() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 5)); shapeBUS.AddPoint(new Point(6, 5)); shapeBUS.AddPoint(new Point(9, 5)); shapeBUS.AddPoint(new Point(15, 5)); shapeBUS.CreatePentagon(); Color color = Color.FromRgb(255, 255, 255); shapeBUS.FillShape(color); }
public void MoveShapeTest1() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 5)); shapeBUS.AddPoint(new Point(6, 5)); shapeBUS.AddPoint(new Point(9, 5)); shapeBUS.AddPoint(new Point(15, 5)); shapeBUS.CreatePentagon(); shapeBUS.ChooseShape("Pentagon_1"); shapeBUS.SetShapeMarginAndStartMovePoint(new Point(0, 1)); shapeBUS.MoveShape(new Point(2, 3)); }
public void FillShapeTest1() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 5)); shapeBUS.AddPoint(new Point(6, 5)); shapeBUS.AddPoint(new Point(9, 5)); shapeBUS.AddPoint(new Point(15, 5)); shapeBUS.CreatePentagon(); shapeBUS.ChooseShape("Pentagon_1"); Color color = Color.FromRgb(0, 0, 0); shapeBUS.FillShape(color); }
public void SaveShapesTest1() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 5)); shapeBUS.AddPoint(new Point(6, 5)); shapeBUS.AddPoint(new Point(9, 5)); shapeBUS.AddPoint(new Point(15, 5)); shapeBUS.CreatePentagon(); shapeBUS.SaveShapes("test.xaml"); var fileText = File.ReadLines("test.xaml"); Assert.IsTrue(fileText.ToString().Length > 1); }
public void ChooseShapeTest() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 5)); shapeBUS.AddPoint(new Point(6, 5)); shapeBUS.AddPoint(new Point(9, 5)); shapeBUS.AddPoint(new Point(15, 5)); shapeBUS.CreatePentagon(); shapeBUS.ChooseShape("Pentagon_1"); int expected = 0; int actual = shapeBUS.ChoosenShapeIndex; Assert.AreEqual(expected, actual); }