public void RemoveAllPointTest() { shapeBUS = new ShapeBUS(); shapeBUS.AddPoint(new Point(0, 0)); shapeBUS.AddPoint(new Point(5, 6)); shapeBUS.AddPoint(new Point(4, 0)); shapeBUS.RemoveAllPoint(); int expected = 0; int actual = shapeBUS.Shapes.Count; Assert.AreEqual(expected, actual); }
private void ShapeItem_Click(object sender, RoutedEventArgs e) { isOpen = false; bus.RemoveAllPoint(); if (((MenuItem)sender).Name == "Pentagon") { action = bus.CreatePentagon; } else { action = null; } bus.ClearChoose(); CanvasPaint.MouseMove -= CanvasContainer_MouseMove; }