public void InsertOpeningsTest()
        {
            BlueprintEditor blueEditor = GetInstance();

            blueEditor.InsertWall(new Point(0, 0), new Point(3, 0));
            blueEditor.InsertOpening(new Door(new Point(1, 0)));
            blueEditor.InsertOpening(new Door(new Point(2, 0)));
            int expectedResult = 2;
            int actualResult   = materials.OpeningsCount();

            Assert.AreEqual(expectedResult, actualResult);
        }
        public void InsertOpeningInNoWall()
        {
            BlueprintEditor blueEditor  = GetInstance();
            Opening         testOpening = new Door(new Point(2, 0));

            blueEditor.InsertOpening(testOpening);
        }
        public void InsertOpeningOutOfRangeTest()
        {
            BlueprintEditor blueEditor  = GetInstance();
            Opening         testOpening = new Door(new Point(50, -3));

            blueEditor.InsertOpening(testOpening);
        }
        public void RemoveWallWithOpening()
        {
            BlueprintEditor blueEditor = GetInstance();

            blueEditor.InsertWall(new Point(0, 0), new Point(3, 0));
            Opening testOpening = new Door(new Point(2, 0));

            blueEditor.InsertOpening(testOpening);
            testOpening = new Door(new Point(1, 0));
            blueEditor.InsertOpening(testOpening);
            blueEditor.RemoveWall(new Point(0, 0), new Point(3, 0));
            int actualResult   = materials.OpeningsCount();
            int expectedResult = 0;

            Assert.AreEqual(expectedResult, actualResult);
        }
        public void RemoveOpeningTest()
        {
            BlueprintEditor blueEditor = GetInstance();

            blueEditor.InsertWall(new Point(2, 3), new Point(2, 1));
            blueEditor.InsertOpening(new Door(new Point(2, 2)));
            blueEditor.RemoveOpening(new Door(new Point(2, 2)));
            int expectedResult = 0;
            int actualResult   = materials.OpeningsCount();

            Assert.AreEqual(expectedResult, actualResult);
        }
        private void InsertAndDrawOpening(Opening newOpening)
        {
            try
            {
                editor.InsertOpening(newOpening);
            }
            catch (Exception)
            {
                //error message
            }

            PaintOpenings();
            calulateCostsAndPrices();
        }