Beispiel #1
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);
        }