Beispiel #1
0
        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");
        }
Beispiel #2
0
        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");
        }
Beispiel #3
0
        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();
        }
Beispiel #4
0
 public DrawShape()
 {
     shapeFactory = new ShapeFactory();
 }