Пример #1
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]);
        }