Exemple #1
0
        public void MonopitchRoofTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var monopitchRoof = new MonopitchRoof(building, 15);

            monopitchRoof.CalculateSnowLoad();
            Assert.AreEqual(0.72, Math.Round(monopitchRoof.SnowLoadOnRoofValue, 3), "Snow load is not calculated properly.");
        }
Exemple #2
0
        public void DriftingAtProjectionsObstructionsTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var driftingAtProjectionsObstructions = new DriftingAtProjectionsObstructions(building, 2);

            Assert.IsNotNull(driftingAtProjectionsObstructions, "DriftingAtProjectionsObstructions should be created.");
            Assert.AreEqual(2, driftingAtProjectionsObstructions.ObstructionHeight,
                            "Height should be set at construction time.");
        }
        public void CylindricalRoofTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var cylindricalRoof = new CylindricalRoof(building, 20, 10);

            Assert.IsNotNull(cylindricalRoof, "CylindricalRoof should be created.");
            Assert.AreEqual(20, cylindricalRoof.Width, "Width should be set at construction time.");
            Assert.AreEqual(10, cylindricalRoof.Height, "Height should be set at construction time.");
        }
        public void SnowOverhangingTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var snowOverhanging = new SnowOverhanging(building, 0.2, 0.72);

            snowOverhanging.CalculateSnowLoad();
            Assert.AreEqual(0.104, Math.Round(snowOverhanging.SnowLoad, 3),
                            "Snow load is not calculated properly.");
        }
Exemple #5
0
        public void DriftingAtProjectionsObstructionsTest_CalculateDriftLength_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var driftingAtProjectionsObstructions = new DriftingAtProjectionsObstructions(building, 4);

            driftingAtProjectionsObstructions.CalculateDriftLength();
            Assert.AreEqual(8, Math.Round(driftingAtProjectionsObstructions.DriftLength, 3),
                            "Drift length for roof is not calculated properly.");
        }
        public void CylindricalRoofTest_CalculateDriftLength_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var cylindricalRoof = new CylindricalRoof(building, 20, 10);

            cylindricalRoof.CalculateDriftLength();
            Assert.AreEqual(17.321, Math.Round(cylindricalRoof.DriftLength, 3),
                            "Drift length for roof is not calculated properly.");
        }
Exemple #7
0
        public void ExceptionalSnowBehindParapetTest_CalculateDriftLength_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalSnowBehindParapet =
                new ExceptionalSnowBehindParapet(building, 20, 1);

            exceptionalSnowBehindParapet.CalculateDriftLength();
            Assert.AreEqual(5, Math.Round(exceptionalSnowBehindParapet.DriftLength, 3),
                            "Drift length for roof is not calculated properly.");
        }
Exemple #8
0
        public void ExceptionalOverDoorOrLoadingBayTest_CalculateDriftLength_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalOverDoorOrLoadingBay =
                new ExceptionalOverDoorOrLoadingBay(building, 3, 20, 1);

            exceptionalOverDoorOrLoadingBay.CalculateDriftLength();
            Assert.AreEqual(3, Math.Round(exceptionalOverDoorOrLoadingBay.DriftLength, 3),
                            "Drift length for roof is not calculated properly.");
        }
Exemple #9
0
        public void ExceptionalRoofAbuttingToTallerConstructionTest_CalculateDriftLength_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalRoofAbuttingToTallerConstruction =
                new ExceptionalRoofAbuttingToTallerConstruction(building, 20, 10, 3, 15);

            exceptionalRoofAbuttingToTallerConstruction.CalculateDriftLength();
            Assert.AreEqual(10, Math.Round(exceptionalRoofAbuttingToTallerConstruction.DriftLength, 3),
                            "Drift length for roof is not calculated properly.");
        }
Exemple #10
0
        public void RoofAbuttingToTallerConstructionTest_CalculateDriftLength_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var roofAbuttingToTallerConstruction = new RoofAbuttingToTallerConstruction(building, 20, 10, 5,
                                                                                        new MonopitchRoof(building, 30));

            roofAbuttingToTallerConstruction.CalculateDriftLength();
            Assert.AreEqual(10, Math.Round(roofAbuttingToTallerConstruction.DriftLength, 3),
                            "Drift length for roof is not calculated properly.");
        }
Exemple #11
0
        public void DriftingAtProjectionsObstructionsTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var driftingAtProjectionsObstructions = new DriftingAtProjectionsObstructions(building, 4);

            driftingAtProjectionsObstructions.CalculateSnowLoad();
            Assert.AreEqual(1.8, Math.Round(driftingAtProjectionsObstructions.SnowLoadOnRoofValue, 3),
                            "Snow load near the obstruction is not calculated properly.");
            Assert.AreEqual(0.72, Math.Round(driftingAtProjectionsObstructions.SnowLoadOnRoofValueAtTheEnd, 3),
                            "Snow load at the end of drifting length is not calculated properly.");
        }
        public void SnowOverhangingTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var snowOverhanging = new SnowOverhanging(building, 0.2, 0.72);

            Assert.IsNotNull(snowOverhanging, "SnowOverhanging should be created.");
            Assert.AreEqual(0.2, snowOverhanging.SnowLayerDepth,
                            "Snow layer should be set at construction time.");
            Assert.AreEqual(0.72, snowOverhanging.SnowLoadOnRoofValue,
                            "Snow load should be set at construction time.");
        }
        public void MultiSpanRoofTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var multiSpanRoof = new MultiSpanRoof(building,
                                                  new MonopitchRoof(building, 45),
                                                  new MonopitchRoof(building, 15));

            Assert.IsNotNull(multiSpanRoof, "MultiSpanRoof should be created.");
            Assert.AreEqual(45, multiSpanRoof.LeftRoof.Slope, "Slope should be set at construction time.");
            Assert.AreEqual(15, multiSpanRoof.RightRoof.Slope, "Slope should be set at construction time.");
        }
        public void ExceptionalObstructionOnPitchedOrCurvedRoofTest_CalculateDriftLength_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalObstructionOnPitchedOrCurvedRoof =
                new ExceptionalObstructionOnPitchedOrCurvedRoof(building, 15, 20, 1, 0.5);

            exceptionalObstructionOnPitchedOrCurvedRoof.CalculateDriftLength();
            Assert.AreEqual(5, Math.Round(exceptionalObstructionOnPitchedOrCurvedRoof.LeftDriftLength, 3),
                            "Drift length for roof is not calculated properly.");
            Assert.AreEqual(2.5, Math.Round(exceptionalObstructionOnPitchedOrCurvedRoof.RightDriftLength, 3),
                            "Drift length for roof is not calculated properly.");
        }
Exemple #15
0
        public void RoofAbuttingToTallerConstructionTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var roofAbuttingToTallerConstruction = new RoofAbuttingToTallerConstruction(building, 20, 10, 5,
                                                                                        new MonopitchRoof(building, 30));

            roofAbuttingToTallerConstruction.CalculateSnowLoad();
            Assert.AreEqual(3.024, Math.Round(roofAbuttingToTallerConstruction.SnowLoadOnRoofValue, 3),
                            "Snow load near the taller construction is not calculated properly.");
            Assert.AreEqual(0.72, Math.Round(roofAbuttingToTallerConstruction.SnowLoadOnRoofValueAtTheEnd, 3),
                            "Snow load at the end of drifting length is not calculated properly.");
        }
Exemple #16
0
        public void ExceptionalMultiSpanRoofTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            building.SnowLoadImplementation.ExcepctionalSituation  = true;
            building.SnowLoadImplementation.CurrentDesignSituation = DesignSituation.B2;

            var exceptionalMultiSpanRoof = new ExceptionalMultiSpanRoof(building, 10, 5, 2);

            exceptionalMultiSpanRoof.CalculateSnowLoad();
            Assert.AreEqual(2.7, Math.Round(exceptionalMultiSpanRoof.SnowLoad, 3),
                            "Snow load between roofs is not calculated properly.");
        }
Exemple #17
0
        public void ExceptionalMultiSpanRoofTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalMultiSpanRoof = new ExceptionalMultiSpanRoof(building, 10, 5, 2);

            Assert.IsNotNull(exceptionalMultiSpanRoof, "MultiSpan should be created.");
            Assert.AreEqual(10, exceptionalMultiSpanRoof.LeftDriftLength,
                            "Drift length should be set at construction time.");
            Assert.AreEqual(5, exceptionalMultiSpanRoof.RightDriftLength,
                            "Drift length should be set at construction time.");
            Assert.AreEqual(2, exceptionalMultiSpanRoof.HeightInTheLowestPart,
                            "Height should be set at construction time.");
        }
        public void CylindricalRoofTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var cylindricalRoof = new CylindricalRoof(building, 20, 10);

            cylindricalRoof.CalculateSnowLoad();
            Assert.AreEqual(0.72, Math.Round(cylindricalRoof.RoofCasesSnowLoad[1], 3),
                            "Snow load for roof is not calculated properly.");
            Assert.AreEqual(0.9, Math.Round(cylindricalRoof.RoofCasesSnowLoad[2], 3),
                            "Snow load for roof is not calculated properly.");
            Assert.AreEqual(1.8, Math.Round(cylindricalRoof.RoofCasesSnowLoad[3], 3),
                            "Snow load for roof is not calculated properly.");
        }
Exemple #19
0
        public void PitchedRoofTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var pitchedRoof = new PitchedRoof(building,
                                              new MonopitchRoof(building, 45),
                                              new MonopitchRoof(building, 15));

            pitchedRoof.CalculateSnowLoad();
            Assert.AreEqual(0.36, Math.Round(pitchedRoof.LeftRoof.SnowLoadOnRoofValue, 3),
                            "Snow load for left roof is not calculated properly.");
            Assert.AreEqual(0.72, Math.Round(pitchedRoof.RightRoof.SnowLoadOnRoofValue, 3),
                            "Snow load for right roof is not calculated properly.");
        }
Exemple #20
0
        public void ExceptionalSnowBehindParapetTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalSnowBehindParapet =
                new ExceptionalSnowBehindParapet(building, 20, 1);

            Assert.IsNotNull(exceptionalSnowBehindParapet,
                             "ExceptionalSnowBehindParapet should be created.");
            Assert.AreEqual(20, exceptionalSnowBehindParapet.Width,
                            "Width should be set at construction time.");
            Assert.AreEqual(1, exceptionalSnowBehindParapet.HeightDifference,
                            "Height should be set at construction time.");
        }
Exemple #21
0
        public void ExceptionalOverDoorOrLoadingBayTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            building.SnowLoad.ExcepctionalSituation  = true;
            building.SnowLoad.CurrentDesignSituation = DesignSituation.B2;

            var exceptionalOverDoorOrLoadingBay =
                new ExceptionalOverDoorOrLoadingBay(building, 3, 20, 1);

            exceptionalOverDoorOrLoadingBay.CalculateSnowLoad();

            Assert.AreEqual(2, Math.Round(exceptionalOverDoorOrLoadingBay.SnowLoad, 3),
                            "Snow load for roof is not calculated properly.");
        }
Exemple #22
0
        public void ExceptionalSnowBehindParapetTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            building.SnowLoadImplementation.ExcepctionalSituation  = true;
            building.SnowLoadImplementation.CurrentDesignSituation = DesignSituation.B2;

            var exceptionalSnowBehindParapet =
                new ExceptionalSnowBehindParapet(building, 20, 1);

            exceptionalSnowBehindParapet.CalculateSnowLoad();

            Assert.AreEqual(2, Math.Round(exceptionalSnowBehindParapet.SnowLoad, 3),
                            "Snow load for roof is not calculated properly.");
        }
Exemple #23
0
        public void ExceptionalOverDoorOrLoadingBayTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalOverDoorOrLoadingBay =
                new ExceptionalOverDoorOrLoadingBay(building, 3, 20, 1);

            Assert.IsNotNull(exceptionalOverDoorOrLoadingBay,
                             "ExceptionalOverDoorOrLoadingBay should be created.");
            Assert.AreEqual(3, exceptionalOverDoorOrLoadingBay.WidthAboveDoor,
                            "Width should be set at construction time.");
            Assert.AreEqual(20, exceptionalOverDoorOrLoadingBay.BuildingWidth,
                            "Width should be set at construction time.");
            Assert.AreEqual(1, exceptionalOverDoorOrLoadingBay.HeightDifference,
                            "Height should be set at construction time.");
        }
Exemple #24
0
        public void ExceptionalSnowBehindParapetAtEavesTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalSnowBehindParapetAtEaves =
                new ExceptionalSnowBehindParapetAtEaves(building, 5, 20, 1);

            Assert.IsNotNull(exceptionalSnowBehindParapetAtEaves,
                             "ExceptionalSnowBehindParapetAtEaves should be created.");
            Assert.AreEqual(5, exceptionalSnowBehindParapetAtEaves.RidgeDistance,
                            "Width should be set at construction time.");
            Assert.AreEqual(20, exceptionalSnowBehindParapetAtEaves.BuildingWidth,
                            "Width should be set at construction time.");
            Assert.AreEqual(1, exceptionalSnowBehindParapetAtEaves.HeightDifference,
                            "Height should be set at construction time.");
        }
        public void ExceptionalObstructionOnPitchedOrCurvedRoofTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            building.SnowLoad.ExcepctionalSituation  = true;
            building.SnowLoad.CurrentDesignSituation = DesignSituation.B2;

            var exceptionalObstructionOnPitchedOrCurvedRoof =
                new ExceptionalObstructionOnPitchedOrCurvedRoof(building, 15, 20, 1, 0.5);

            exceptionalObstructionOnPitchedOrCurvedRoof.CalculateSnowLoad();

            Assert.AreEqual(2, Math.Round(exceptionalObstructionOnPitchedOrCurvedRoof.LeftSnowLoad, 3),
                            "Snow load for roof is not calculated properly.");
            Assert.AreEqual(1, Math.Round(exceptionalObstructionOnPitchedOrCurvedRoof.RightSnowLoad, 3),
                            "Snow load for roof is not calculated properly.");
        }
Exemple #26
0
        public void ExceptionalRoofAbuttingToTallerConstructionTest_CalculateSnowLoad_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            building.SnowLoadImplementation.ExcepctionalSituation  = true;
            building.SnowLoadImplementation.CurrentDesignSituation = DesignSituation.B2;

            var exceptionalRoofAbuttingToTallerConstruction =
                new ExceptionalRoofAbuttingToTallerConstruction(building, 20, 10, 3, 15);

            exceptionalRoofAbuttingToTallerConstruction.CalculateSnowLoad();

            Assert.AreEqual(3.6, Math.Round(exceptionalRoofAbuttingToTallerConstruction.SnowLoadNearTheTop, 3),
                            "Snow load for roof is not calculated properly.");
            Assert.AreEqual(3.6, Math.Round(exceptionalRoofAbuttingToTallerConstruction.SnowLoadNearTheEdge, 3),
                            "Snow load for roof is not calculated properly.");
        }
        public void ExceptionalObstructionOnPitchedOrCurvedRoofTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalObstructionOnPitchedOrCurvedRoof =
                new ExceptionalObstructionOnPitchedOrCurvedRoof(building, 15, 20, 1, 0.5);

            Assert.IsNotNull(exceptionalObstructionOnPitchedOrCurvedRoof,
                             "ExceptionalObstructionOnPitchedOrCurvedRoof should be created.");
            Assert.AreEqual(15, exceptionalObstructionOnPitchedOrCurvedRoof.LeftWidth,
                            "Width should be set at construction time.");
            Assert.AreEqual(20, exceptionalObstructionOnPitchedOrCurvedRoof.RightWidth,
                            "Width should be set at construction time.");
            Assert.AreEqual(1, exceptionalObstructionOnPitchedOrCurvedRoof.LeftHeightDifference,
                            "Height should be set at construction time.");
            Assert.AreEqual(0.5, exceptionalObstructionOnPitchedOrCurvedRoof.RightHeightDifference,
                            "Height should be set at construction time.");
        }
Exemple #28
0
        public void ExceptionalRoofAbuttingToTallerConstructionTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var exceptionalRoofAbuttingToTallerConstruction =
                new ExceptionalRoofAbuttingToTallerConstruction(building, 20, 10, 3, 15);

            Assert.IsNotNull(exceptionalRoofAbuttingToTallerConstruction,
                             "ExceptionalRoofAbuttingToTallerConstruction should be created.");
            Assert.AreEqual(20, exceptionalRoofAbuttingToTallerConstruction.UpperBuildingWidth,
                            "Width should be set at construction time.");
            Assert.AreEqual(10, exceptionalRoofAbuttingToTallerConstruction.LowerBuildingWidth,
                            "Width should be set at construction time.");
            Assert.AreEqual(3, exceptionalRoofAbuttingToTallerConstruction.HeightDifference,
                            "Height should be set at construction time.");
            Assert.AreEqual(15, exceptionalRoofAbuttingToTallerConstruction.Angle,
                            "Angle should be set at construction time.");
        }
Exemple #29
0
        public void RoofAbuttingToTallerConstructionTest_Constructor_Success()
        {
            var building = BuildingImplementation.CreateBuilding();

            var roofAbuttingToTallerConstruction = new RoofAbuttingToTallerConstruction(building, 20, 10, 5,
                                                                                        new MonopitchRoof(building, 30));

            Assert.IsNotNull(roofAbuttingToTallerConstruction, "RoofAbuttingToTallerConstruction should be created.");
            Assert.AreEqual(20, roofAbuttingToTallerConstruction.WidthOfUpperBuilding,
                            "Width should be set at construction time.");
            Assert.AreEqual(10, roofAbuttingToTallerConstruction.WidthOfLowerBuilding,
                            "Width should be set at construction time.");
            Assert.AreEqual(5, roofAbuttingToTallerConstruction.HeightDifference,
                            "Height should be set at construction time.");
            Assert.IsNotNull(roofAbuttingToTallerConstruction.UpperRoof,
                             "Upper roof should be set at construction time.");
            Assert.AreEqual(30, roofAbuttingToTallerConstruction.UpperRoof.Slope,
                            "Slope should be set at construction time.");
        }