Exemple #1
0
        public void ExceptionalMultispanRoofTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();

            // Act
            ViewResult result = controller.ExceptionalMultispanRoof() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Exemple #2
0
        public void SnowguardsTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();

            // Act
            ViewResult result = controller.Snowguards() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Exemple #3
0
        public void ExceptionalObstructionOnPitchedOrCurvedRoofTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();

            // Act
            ViewResult result = controller.ExceptionalObstructionOnPitchedOrCurvedRoof() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Exemple #4
0
        public void ExceptionalSnowInValleyBehindParapetTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();

            // Act
            ViewResult result = controller.ExceptionalSnowInValleyBehindParapet() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Exemple #5
0
        public void DriftingAtProjectionsObstructionsTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();

            // Act
            ViewResult result = controller.DriftingAtProjectionsObstructions() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Exemple #6
0
        public void PitchedRoofTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();

            // Act
            ViewResult result = controller.PitchedRoof() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Exemple #7
0
        public void ExceptionalOverDoorOrLoadingBayTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();

            // Act
            ViewResult result = controller.ExceptionalOverDoorOrLoadingBay() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Exemple #8
0
        public void ExceptionalRoofAbuttingToTallerConstructionTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();

            // Act
            ViewResult result = controller.ExceptionalRoofAbuttingToTallerConstruction() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Exemple #9
0
        public void CalculatorTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();

            // Act
            ViewResult result = controller.Calculator() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("Snow load", result.ViewBag.Title);
        }
Exemple #10
0
        public void CalculatePitchedRoofTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();
            var buildingData = CreateBuildingData();
            var model        = CreatePitchedRoof(buildingData);

            // Act
            ViewResult result = controller.CalculatePitchedRoof(model, buildingData) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("PitchedRoofResult", result.ViewName);
            Assert.IsTrue(result.Model.GetType() == typeof(SnowLoadPitchedRoof));
            Assert.AreNotEqual(0, model.PitchedRoof.LeftRoofCasesSnowLoad[1]);
        }
Exemple #11
0
        public void CalculateSnowInValleyBehindParapetTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();
            var buildingData = CreateBuildingData(DesignSituation.B3, true);
            var model        = CreateExceptionalSnowInValleyBehindParapet(buildingData);

            // Act
            ViewResult result = controller.CalculateExceptionalSnowInValleyBehindParapet(model, buildingData) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("ExceptionalSnowInValleyBehindParapetResult", result.ViewName);
            Assert.IsTrue(result.Model.GetType() == typeof(ExceptionalSnowLoadSnowInValleyBehindParapet));
            Assert.AreNotEqual(0, model.ExceptionalSnowInValleyBehindParapet.SnowLoad);
        }
Exemple #12
0
        public void CalculateRoofAbuttingToTallerConstructionTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();
            var buildingData = CreateBuildingData();
            var model        = CreateRoofAbuttingToTallerConstruction(buildingData);

            // Act
            ViewResult result = controller.CalculateRoofAbuttingToTallerConstruction(model, buildingData) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("RoofAbuttingToTallerConstructionResult", result.ViewName);
            Assert.IsTrue(result.Model.GetType() == typeof(SnowLoadRoofAbuttingToTallerConstruction));
            Assert.AreNotEqual(0, model.RoofAbuttingToTallerConstruction.SnowLoadOnRoofValue);
        }
Exemple #13
0
        public void CalculateDriftingAtProjectionsObstructionsTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();
            var buildingData = CreateBuildingData();
            var model        = CreateDriftingAtProjectionsObstructions(buildingData);

            // Act
            ViewResult result = controller.CalculateDriftingAtProjectionsObstructions(model, buildingData) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("DriftingAtProjectionsObstructionsResult", result.ViewName);
            Assert.IsTrue(result.Model.GetType() == typeof(SnowLoadDriftingAtProjectionsObstructions));
            Assert.AreNotEqual(0, model.DriftingAtProjectionsObstructions.SnowLoadOnRoofValue);
        }
Exemple #14
0
        public void CalculateObstructionOnPitchedOrCurvedRoofTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();
            var buildingData = CreateBuildingData(DesignSituation.B3, true);
            var model        = CreateExceptionalObstructionOnPitchedOrCurvedRoof(buildingData);

            // Act
            ViewResult result = controller.CalculateExceptionalObstructionOnPitchedOrCurvedRoof(model, buildingData) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("ExceptionalObstructionOnPitchedOrCurvedRoofResult", result.ViewName);
            Assert.IsTrue(result.Model.GetType() == typeof(ExceptionalSnowLoadObstructionOnPitchedOrCurvedRoof));
            Assert.AreNotEqual(0, model.ExceptionalObstructionOnPitchedOrCurvedRoof.LeftSnowLoad);
        }
Exemple #15
0
        public void CalculateSnowguardsTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();
            var buildingData = CreateBuildingData();
            var model        = CreateSnowguards();

            // Act
            ViewResult result = controller.CalculateSnowguards(model, buildingData) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("SnowguardsResult", result.ViewName);
            Assert.IsTrue(result.Model.GetType() == typeof(SnowLoadSnowguards));
            Assert.AreNotEqual(0, model.Snowguards.SnowLoadOnRoofValue);
        }
Exemple #16
0
        public void CalculateMultispanRoofTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();
            var buildingData = CreateBuildingData();
            var model        = CreateMultiSpanRoof(buildingData);

            // Act
            ViewResult result = controller.CalculateMultispanRoof(model, buildingData) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("MultispanRoofResult", result.ViewName);
            Assert.IsTrue(result.Model.GetType() == typeof(SnowLoadMultispanRoof));
            Assert.AreNotEqual(0, model.MultiSpanRoof.SnowLoadOnMiddleRoof);
        }
Exemple #17
0
        public void CalculateExceptionalRoofAbuttingToTallerConstructionTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();
            var buildingData = CreateBuildingData(DesignSituation.B3, true);
            var model        = CreateExceptionalRoofAbuttingToTallerConstruction(buildingData);

            // Act
            ViewResult result = controller.CalculateExceptionalRoofAbuttingToTallerConstruction(model, buildingData) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("ExceptionalRoofAbuttingToTallerConstructionResult", result.ViewName);
            Assert.IsTrue(result.Model.GetType() == typeof(ExceptionalSnowLoadRoofAbuttingToTallerConstruction));
            Assert.AreNotEqual(0, model.ExceptionalRoofAbuttingToTallerConstruction.SnowLoadNearTheEdge);
        }