public void AnchorageLengthTest_CalculateWithMultipleCoefficients_Success() { var reinforcementPosition = AnchoringHelper.CreateReinforcementPosition(); var reinforcement = new Reinforcement(10, 500, false); var barFormCoefficient = new BarFormCoefficient(reinforcementPosition, reinforcement); var coverCoefficient = new CoverCoefficient(reinforcementPosition, reinforcement); var transversePressureCoefficient = new TransversePressureCoefficient(reinforcementPosition, 5); var transverseReinforcementCoefficient = new TransverseReinforcementCoefficient(reinforcementPosition, reinforcement, TypeEnum.Beam, 5); var weldedTransverseBarCoefficient = new WeldedTransverseBarCoefficient(); var coefficients = new List <ICoefficient>(); coefficients.Add(barFormCoefficient); coefficients.Add(coverCoefficient); coefficients.Add(transversePressureCoefficient); coefficients.Add(transverseReinforcementCoefficient); coefficients.Add(weldedTransverseBarCoefficient); var anchorageLength = new AnchorageLength(reinforcement, reinforcementPosition, ConcreteClassEnum.C25_30, TypeEnum.Beam, BondConditionEnum.Good, coefficients); anchorageLength.CalculateAnchorageLengths(); Assert.AreEqual(375.738, Math.Round(anchorageLength.BasicRequiredAnchorageLength, 3), "BasicRequiredAnchorageLength not calculated properly."); Assert.AreEqual(112.721, Math.Round(anchorageLength.MinimumAnchorageLength, 3), "MinimumAnchorageLength not calculated properly."); Assert.AreEqual(128.878, Math.Round(anchorageLength.DesignAnchorageLength, 3), "DesignAnchorageLength not calculated properly."); }
public void BarFormCoefficientTest_Calculate_Success() { var reinforcementPosition = AnchoringHelper.CreateReinforcementPosition(); var bar = new Bar(10); var barFormCoefficient = new BarFormCoefficient(reinforcementPosition, bar); barFormCoefficient.Calculate(); Assert.AreEqual(0.7, Math.Round(barFormCoefficient.Coefficient, 3), "Coefficient not calculated properly."); }
public void CoverCoefficientTest_Calculate_Success() { var reinforcementPosition = AnchoringHelper.CreateReinforcementPosition(); var transversePressureCoefficient = new TransversePressureCoefficient(reinforcementPosition, 5); transversePressureCoefficient.Calculate(); Assert.AreEqual(0.8, Math.Round(transversePressureCoefficient.Coefficient, 3), "Coefficient not calculated properly."); }
public void AnchorageLengthTest_ConcreteClassProperty_Success() { var reinforcementPosition = AnchoringHelper.CreateReinforcementPosition(); var reinforcement = new Reinforcement(12, 500, false); var anchorageLength = new AnchorageLength(reinforcement, reinforcementPosition, ConcreteClassEnum.C25_30, TypeEnum.Beam, BondConditionEnum.Good, null); Assert.IsNotNull(anchorageLength.ConcreteClass, "ConcreteClass should be created."); Assert.AreEqual(ConcreteClassEnum.C25_30, anchorageLength.ConcreteClass.ClassOfConcrete, "ClassOfConcrete should be set at construction time."); }
public void TransversePressureCoefficientTest_Constructor_Success() { var reinforcementPosition = AnchoringHelper.CreateReinforcementPosition(); var transversePressureCoefficient = new TransversePressureCoefficient(reinforcementPosition, 250); Assert.IsNotNull(transversePressureCoefficient, "TransversePressureCoefficient should be created."); Assert.IsNotNull(transversePressureCoefficient.ReinforcementPosition, "ReinforcementPosition should be set at construction time."); Assert.AreEqual(250, transversePressureCoefficient.TransversePressure, "TransversePressure should be set at construction time."); }
public void BarFormCoefficientTest_Constructor_Success() { var reinforcementPosition = AnchoringHelper.CreateReinforcementPosition(); var bar = new Bar(12); var barFormCoefficient = new BarFormCoefficient(reinforcementPosition, bar); Assert.IsNotNull(barFormCoefficient, "BarFormCoefficient should be created."); Assert.IsNotNull(barFormCoefficient.ReinforcementPosition, "ReinforcementPosition should be set at construction time."); Assert.IsNotNull(barFormCoefficient.Bar, "Bar should be set at construction time."); }
public void TransverseReinforcementCoefficientTest_Calculate_Success() { var reinforcementPosition = AnchoringHelper.CreateReinforcementPosition(); var bar = new Bar(12); var transverseReinforcementCoefficient = new TransverseReinforcementCoefficient( reinforcementPosition, bar, TypeEnum.Beam, 5); transverseReinforcementCoefficient.Calculate(); Assert.AreEqual(0.791, Math.Round(transverseReinforcementCoefficient.Coefficient, 3), "Coefficient not calculated properly."); }
public void AnchorageLengthTest_CalculateWithoutCoefficients_Success() { var reinforcementPosition = AnchoringHelper.CreateReinforcementPosition(); var reinforcement = new Reinforcement(12, 500, false); var anchorageLength = new AnchorageLength(reinforcement, reinforcementPosition, ConcreteClassEnum.C25_30, TypeEnum.Beam, BondConditionEnum.Good, null); anchorageLength.CalculateAnchorageLengths(); Assert.AreEqual(450.886, Math.Round(anchorageLength.BasicRequiredAnchorageLength, 3), "BasicRequiredAnchorageLength not calculated properly."); Assert.AreEqual(135.266, Math.Round(anchorageLength.MinimumAnchorageLength, 3), "MinimumAnchorageLength not calculated properly."); Assert.AreEqual(450.886, Math.Round(anchorageLength.DesignAnchorageLength, 3), "DesignAnchorageLength not calculated properly."); }
public void AnchorageLengthTest_CalculateWithSameoefficients_Exception() { var reinforcementPosition = AnchoringHelper.CreateReinforcementPosition(); var reinforcement = new Reinforcement(10, 500, false); var barFormCoefficient = new BarFormCoefficient(reinforcementPosition, reinforcement); var coefficients = new List <ICoefficient>(); coefficients.Add(barFormCoefficient); coefficients.Add(barFormCoefficient); var anchorageLength = new AnchorageLength(reinforcement, reinforcementPosition, ConcreteClassEnum.C25_30, TypeEnum.Beam, BondConditionEnum.Good, coefficients); Assert.Throws <ArgumentException>(() => anchorageLength.CalculateAnchorageLengths(), "More than one coefficient type should throw ArgumentException."); }
public void TransverseReinforcementCoefficientTest_Constructor_Success() { var reinforcementPosition = AnchoringHelper.CreateReinforcementPosition(); var bar = new Bar(12); var transverseReinforcementCoefficient = new TransverseReinforcementCoefficient( reinforcementPosition, bar, TypeEnum.Beam, 10); Assert.IsNotNull(transverseReinforcementCoefficient, "TransverseReinforcementCoefficient should be created."); Assert.IsNotNull(transverseReinforcementCoefficient.ReinforcementPosition, "ReinforcementPosition should be set at construction time."); Assert.IsNotNull(transverseReinforcementCoefficient.Bar, "Bar should be set at construction time."); Assert.AreEqual(TypeEnum.Beam, transverseReinforcementCoefficient.Type, "Type should be set at construction time."); Assert.AreEqual(10, transverseReinforcementCoefficient.TransverseReinforcementArea, "TransverseReinforcementArea should be set at construction time."); }
public void AnchorageLengthTest_CalculateWithCoverCoefficient_Success() { var reinforcementPosition = AnchoringHelper.CreateReinforcementPosition(); var reinforcement = new Reinforcement(10, 500, false); var coverCoefficient = new CoverCoefficient(reinforcementPosition, reinforcement); var coefficients = new List <ICoefficient>(); coefficients.Add(coverCoefficient); var anchorageLength = new AnchorageLength(reinforcement, reinforcementPosition, ConcreteClassEnum.C25_30, TypeEnum.Beam, BondConditionEnum.Good, coefficients); anchorageLength.CalculateAnchorageLengths(); Assert.AreEqual(375.738, Math.Round(anchorageLength.BasicRequiredAnchorageLength, 3), "BasicRequiredAnchorageLength not calculated properly."); Assert.AreEqual(112.721, Math.Round(anchorageLength.MinimumAnchorageLength, 3), "MinimumAnchorageLength not calculated properly."); Assert.AreEqual(347.558, Math.Round(anchorageLength.DesignAnchorageLength, 3), "DesignAnchorageLength not calculated properly."); }