Beispiel #1
0
        public void CalculateMonopitchRoofTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();
            var buildingData = CreateBuildingData();
            var model        = CreateMonopitchRoof(buildingData);

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

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("MonopitchRoofResult", result.ViewName);
            Assert.IsTrue(result.Model.GetType() == typeof(SnowLoadMonopitchRoof));
            Assert.AreNotEqual(0, model.MonopitchRoof.SnowLoadOnRoofValue);
        }