コード例 #1
0
        public void CalculateSnowLoadShapeCoefficient2Test_MoreThan60Degree_Success()
        {
            double slope = 70;

            double result = ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient2(slope);

            Assert.AreEqual(1.6, result, "Something go wrong with shape coefficient calculation. Slope {slope}degree.");
        }
コード例 #2
0
 /// <summary>
 /// Method calculate shape coefficient for multispan roof.
 /// </summary>
 /// <seealso cref="ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient2(double)"/>
 private void CalculateSnowLoadShapeCoefficient()
 {
     if (LeftRoof.Slope > 60 || RightRoof.Slope > 60)
     {
         ShapeCoefficient = 1.6;
     }
     else
     {
         ShapeCoefficient =
             ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient2(
                 LeftRoof.Slope + RightRoof.Slope);
     }
 }
コード例 #3
0
        public void CalculateSnowLoadShapeCoefficient2Test_LessThan0Degree_Success()
        {
            double slope = -20;

            Assert.Throws <ArgumentOutOfRangeException>(() => ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient2(slope), "Method shouldn't work for this specific example.");
        }