private static void AddEntityForOvertoppingRateOutput(GrassCoverErosionInwardsOutputEntity entity, OvertoppingRateOutput output) { if (output != null) { entity.GrassCoverErosionInwardsOvertoppingRateOutputEntities.Add(output.Create()); } }
public void Create_WithGeneralResult_ReturnsGrassCoverErosionInwardsDikeHeightOutputEntityWithGeneralResultEntity() { // Setup var random = new Random(21); var output = new OvertoppingRateOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN, random.NextEnumValue <CalculationConvergence>(), new TestGeneralResultFaultTreeIllustrationPoint()); // Call GrassCoverErosionInwardsOvertoppingRateOutputEntity entity = output.Create(); // Assert Assert.IsNotNull(entity); GeneralResultEntityTestHelper.AssertGeneralResultPropertyValues(output.GeneralResult, entity.GeneralResultFaultTreeIllustrationPointEntity); }
public void Create_WithNaNParameters_ReturnsGrassCoverErosionInwardsOvertoppingRateOutputEntityWithOutputNull() { // Setup var random = new Random(21); var output = new OvertoppingRateOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN, random.NextEnumValue <CalculationConvergence>(), null); // Call GrassCoverErosionInwardsOvertoppingRateOutputEntity entity = output.Create(); // Assert Assert.IsNotNull(entity); Assert.IsNull(entity.OvertoppingRate); Assert.IsNull(entity.TargetProbability); Assert.IsNull(entity.TargetReliability); Assert.IsNull(entity.CalculatedProbability); Assert.IsNull(entity.CalculatedReliability); Assert.AreEqual((byte)output.CalculationConvergence, entity.CalculationConvergence); Assert.IsNull(entity.GeneralResultFaultTreeIllustrationPointEntity); }