Exemple #1
0
        public void CalculateSnowOverhangingTest()
        {
            // Arrange
            SnowLoadsController controller = new SnowLoadsController();
            var buildingData = CreateBuildingData();
            var model        = CreateSnowOverhanging(buildingData);

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

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("SnowOverhangingResult", result.ViewName);
            Assert.IsTrue(result.Model.GetType() == typeof(SnowLoadSnowOverhanging));
            Assert.AreNotEqual(0, model.SnowOverhanging.SnowLoadOnRoofValue);
        }