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."); }
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."); }
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."); }
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}."); }
/// <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); } }
public void CalculateSnowLoadShapeCoefficient2Test_LessThan0Degree_Success() { double slope = -20; Assert.Throws <ArgumentOutOfRangeException>(() => ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient2(slope), "Method shouldn't work for this specific example."); }
/// <summary> /// Method calculate <see cref="ShapeCoefficient"/> for monopitch roof. /// </summary> /// <seealso cref="ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient1(double, bool)"/> private void CalculateSnowLoadShapeCoefficient() { ShapeCoefficient = ShapeCoefficientCalc.CalculateSnowLoadShapeCoefficient1(Slope, SnowFences); }