public void Constructor_WithName_ExpectedValues() { // Setup const string name = "name"; // Call var readCalculation = new GrassCoverErosionInwardsCalculationConfiguration(name); // Assert Assert.IsInstanceOf <IConfigurationItem>(readCalculation); Assert.AreEqual(name, readCalculation.Name); Assert.IsNull(readCalculation.HydraulicBoundaryLocationName); Assert.IsNull(readCalculation.DikeProfileId); Assert.IsNull(readCalculation.Orientation); Assert.IsNull(readCalculation.DikeHeight); Assert.IsNull(readCalculation.WaveReduction); Assert.IsNull(readCalculation.CriticalFlowRate); Assert.IsNull(readCalculation.ShouldOvertoppingOutputIllustrationPointsBeCalculated); Assert.IsNull(readCalculation.ShouldDikeHeightBeCalculated); Assert.IsNull(readCalculation.DikeHeightTargetProbability); Assert.IsNull(readCalculation.ShouldDikeHeightIllustrationPointsBeCalculated); Assert.IsNull(readCalculation.ShouldOvertoppingRateBeCalculated); Assert.IsNull(readCalculation.OvertoppingRateTargetProbability); Assert.IsNull(readCalculation.ShouldOvertoppingRateIllustrationPointsBeCalculated); Assert.IsNull(readCalculation.Scenario); }
private static void AssertConfiguration(GrassCoverErosionInwardsCalculationConfiguration configuration) { Assert.IsNotNull(configuration); Assert.AreEqual("Berekening 1", configuration.Name); Assert.AreEqual("Some_hydraulic_boundary_location", configuration.HydraulicBoundaryLocationName); Assert.AreEqual("some_dike_profile", configuration.DikeProfileId); Assert.AreEqual(67.1, configuration.Orientation); Assert.AreEqual(3.45, configuration.DikeHeight); Assert.AreEqual(true, configuration.WaveReduction.UseBreakWater); Assert.AreEqual(ConfigurationBreakWaterType.Dam, configuration.WaveReduction.BreakWaterType); Assert.AreEqual(1.234, configuration.WaveReduction.BreakWaterHeight); Assert.AreEqual(false, configuration.WaveReduction.UseForeshoreProfile); Assert.AreEqual(0.1, configuration.CriticalFlowRate.Mean); Assert.AreEqual(0.2, configuration.CriticalFlowRate.StandardDeviation); Assert.IsTrue(configuration.ShouldOvertoppingOutputIllustrationPointsBeCalculated); Assert.IsTrue(configuration.ShouldDikeHeightBeCalculated); Assert.IsTrue(configuration.ShouldDikeHeightIllustrationPointsBeCalculated); Assert.IsFalse(configuration.ShouldOvertoppingRateBeCalculated); Assert.IsFalse(configuration.ShouldOvertoppingRateIllustrationPointsBeCalculated); Assert.AreEqual(8.8, configuration.Scenario.Contribution); Assert.IsTrue(configuration.Scenario.IsRelevant); }