コード例 #1
0
        public void CalculateSnowLoadShapeCoefficient1Test_LessThan0DegreeWithFences_Exception()
        {
            double slope      = -50;
            bool   snowFences = true;

            Assert.Throws <ArgumentOutOfRangeException>(() => ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient1(slope, snowFences), "Method shouldn't work for this specific example.");
        }
コード例 #2
0
        public void CalculateSnowLoadShapeCoefficient1Test_MoreThan60DegreeWithoutFences_Success()
        {
            double slope  = 80;
            double result = ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient1(slope);

            Assert.AreEqual(0, result, $"Something go wrong with shape coefficient calculation. Slope {slope}degree.");
        }
コード例 #3
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.");
        }
コード例 #4
0
        public void CalculateSnowLoadShapeCoefficient1Test_MoreThan60DegreeWithFences_Success()
        {
            double slope      = 80;
            bool   snowFences = true;
            double result     = ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient1(slope, snowFences);

            Assert.AreEqual(0.8, result, $"Something go wrong with shape coefficient calculation. Slope {slope}degree. Fences: {snowFences}.");
        }
コード例 #5
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);
     }
 }
コード例 #6
0
        public void CalculateSnowLoadShapeCoefficient2Test_LessThan0Degree_Success()
        {
            double slope = -20;

            Assert.Throws <ArgumentOutOfRangeException>(() => ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient2(slope), "Method shouldn't work for this specific example.");
        }
コード例 #7
0
ファイル: MonopitchRoof.cs プロジェクト: DijkstraPL/KPK_Calcs
 /// <summary>
 /// Method calculate <see cref="ShapeCoefficient"/> for monopitch roof.
 /// </summary>
 /// <seealso cref="ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient1(double, bool)"/>
 private void CalculateSnowLoadShapeCoefficient()
 {
     ShapeCoefficient = ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient1(Slope, SnowFences);
 }