public void CheckHexagonIsCreated() { ShapeFactory sf = new ShapeFactory(); var expected = new Hexagon(); var actual = sf.getShape("Hexagon"); Assert.AreEqual(expected.ToString(), actual.ToString(), "Different shapes are returned"); }
public void CheckTriangleIsCreated() { ShapeFactory sf = new ShapeFactory(); var expected = new Triangle(); var actual = sf.getShape("Triangle"); Assert.AreEqual(expected.ToString(), actual.ToString(), "Different shapes are returned"); }
public Form1() { InitializeComponent(); this.Text = "Program"; sizes.GetPrimaryScreenSize(); sizes.GetFormScreenSize(this.Height, this.Width); sizes.STATUS_BAR = statusStrip1.Height; shapeFactory = new ShapeFactory(); BasicConfigurator.Configure(); Logger.Debug(" no of processors: " + sizes.PROCESSORS); int menuBar = this.menuStrip1.Size.Height; BorderWidth = (this.Width - this.ClientSize.Width) / 2; TitlebarHeight = this.Height - this.ClientSize.Height - BorderWidth + menuBar; HideButtons(); }
public DrawShape() { shapeFactory = new ShapeFactory(); }