public ConcreteCoverOutputString GetResults(ConcreteCoverInput input) { var calculator = new ConcreteCoverCalculator(); var output = calculator.CalculateNominalConcreteCover(input); return(new ConcreteCoverOutputString { StructuralClass = "S" + output.StructuralClass.ToString(), MinimumCover = (output.MinimumCover * 1000).ToString() + " mm", MinimumCoverDueToBondRequirement = (output.MinimumCoverDueToBondRequirement * 1000).ToString() + " mm", MinimumCoverDueToEnvironmentalConditions = (output.MinimumCoverDueToEnvironmentalConditions * 1000).ToString() + " mm", NominalCover = (output.NominalCover * 1000).ToString() + " mm" }); }
public void CalculateMinimumCoverDueToBondRequirementTests(int testCaseNumber, ArrangementOfBars arrangementOfBars, double rebarDiameter, bool NominalMaximumAggregateSizeIsGreaterThan32mm, double expectedCover) { ConcreteCoverInput inputData = new ConcreteCoverInput() { ArrangementOfBars = ConcreteCoverCalculator.ConvertArrangementOfBarsToString(arrangementOfBars), RebarDiameter = (rebarDiameter * 1000).ToString() + " mm", NominalMaximumAggregateSizeIsGreaterThan32mm = NominalMaximumAggregateSizeIsGreaterThan32mm }; ConcreteCoverCalculator coverCalculator = new ConcreteCoverCalculator(); var result = coverCalculator.CalculateMinimumCoverDueToBondRequirement(inputData); Assert.AreEqual(expectedCover, result.MinimumCoverDueToBondRequirement); }
public void CalculateMinimumCoverDueToEnvironmentalConditionsTests(int testCaseNumber, ExposureClass exposureClass, StructuralClass structuralClass, double expectedCover) { ConcreteCoverInput inputData = new ConcreteCoverInput() { ExposureClass = ConcreteCoverCalculator.ConvertExposureClassToString(exposureClass), }; ConcreteCoverCalculator coverCalculator = new ConcreteCoverCalculator(); coverCalculator.outputData.StructuralClass = ConcreteCoverCalculator.ConvertStructuralClassToString(structuralClass); var result = coverCalculator.CalculateMinimumCoverDueToEnvironmentalConditions(inputData); Assert.AreEqual(expectedCover, result.MinimumCoverDueToEnvironmentalConditions); }
public void CalculateNominalConcreteCoverTests_(int testCaseNumber, double minimumCover, double allowanceInDesignForDeviation, double expectedCover) { ConcreteCoverInput inputData = new ConcreteCoverInput() { ArrangementOfBars = "Separated", RebarDiameter = "16 mm", ExposureClass = "XC3", ConcreteClass = "C30/37", BaseStructuralClass = "S4", AllowanceInDesignForDeviation = allowanceInDesignForDeviation }; ConcreteCoverCalculator coverCalculator = new ConcreteCoverCalculator(); coverCalculator.outputData.MinimumCover = minimumCover; var result = coverCalculator.CalculateNominalConcreteCover(inputData); Assert.AreEqual(expectedCover, result.NominalCover); }
public void CalculateStructuralClass(string testCaseNumber, StructuralClass structureClass, bool designWorkingLifeOf100Years, ExposureClass exposureClass, ConcreteClass concreteClass, bool memberWithSlabGeometry, bool specialQualityControlOfTheConcreteProductionEnsured, string expectedStructuralClass) { ConcreteCoverInput inputData = new ConcreteCoverInput() { // Recommended Structural Class when design working life is 50 years BaseStructuralClass = ConcreteCoverCalculator.ConvertStructuralClassToString(structureClass), DesignWorkingLifeOf100Years = designWorkingLifeOf100Years, ExposureClass = ConcreteCoverCalculator.ConvertExposureClassToString(exposureClass), ConcreteClass = ConcreteCoverCalculator.ConvertConcreteClassToString(concreteClass), MemberWithSlabGeometry = memberWithSlabGeometry, SpecialQualityControlOfTheConcreteProductionEnsured = specialQualityControlOfTheConcreteProductionEnsured }; ConcreteCoverCalculator coverCalculator = new ConcreteCoverCalculator(); var result = coverCalculator.CalculateStructuralClass(inputData); Assert.AreEqual(expectedStructuralClass, "S" + result.StructuralClass); }