public void Constructor_ExpectedValues() { // Setup const string name = "some name"; // Call var configuration = new StabilityStoneCoverWaveConditionsCalculationConfiguration(name); // Assert Assert.IsInstanceOf <WaveConditionsCalculationConfiguration>(configuration); Assert.AreEqual(name, configuration.Name); Assert.IsNull(configuration.CalculationType); }
public void SimpleProperties_SetNewValues_NewValuesSet() { // Setup const string calculationName = "Name of the calculation"; var calculationType = new Random(21).NextEnumValue <ConfigurationStabilityStoneCoverCalculationType>(); // Call var configuration = new StabilityStoneCoverWaveConditionsCalculationConfiguration(calculationName) { CalculationType = calculationType }; // Assert Assert.AreEqual(calculationType, configuration.CalculationType); }
private static void AssertConfiguration(StabilityStoneCoverWaveConditionsCalculationConfiguration configuration) { Assert.IsNotNull(configuration); Assert.AreEqual("Locatie", configuration.HydraulicBoundaryLocationName); Assert.AreEqual(1.1, configuration.UpperBoundaryRevetment); Assert.AreEqual(2.2, configuration.LowerBoundaryRevetment); Assert.AreEqual(3.3, configuration.UpperBoundaryWaterLevels); Assert.AreEqual(4.4, configuration.LowerBoundaryWaterLevels); Assert.AreEqual(ConfigurationWaveConditionsInputStepSize.Half, configuration.StepSize); Assert.AreEqual("Voorlandprofiel", configuration.ForeshoreProfileId); Assert.AreEqual(5.5, configuration.Orientation); Assert.IsTrue(configuration.WaveReduction.UseBreakWater); Assert.AreEqual(ConfigurationBreakWaterType.Caisson, configuration.WaveReduction.BreakWaterType); Assert.AreEqual(6.6, configuration.WaveReduction.BreakWaterHeight); Assert.IsFalse(configuration.WaveReduction.UseForeshoreProfile); Assert.AreEqual(ConfigurationStabilityStoneCoverCalculationType.Columns, configuration.CalculationType); }