Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs =================================================================== diff -u -r4624 -r4627 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 4624) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 4627) @@ -111,17 +111,17 @@ CalculationResult = CalculationResult.NoRun }; int errorCount = kernelWrapper.Validate(macroStabilityInput, macroStabilityOutput, out List messages); - Assert.IsTrue(errorCount > 0); + Assert.That(errorCount, Is.GreaterThan(0)); Assert.That(macroStabilityOutput.CalculationResult, Is.EqualTo(CalculationResult.InvalidInputData)); // Validate the input when valid input is provided. Expected no messages. DamKernelInput kernelInput = CreateDamKernelInputForTest(); kernelInput.Location.ModelFactors.UpliftCriterionStability = 1.4; PrepareResult prepareResult = kernelWrapper.Prepare(kernelInput, 0, out IKernelDataInput kernelDataInput, out IKernelDataOutput kernelDataOutput); - Assert.IsTrue(prepareResult == PrepareResult.Successful); + Assert.That(prepareResult, Is.EqualTo(PrepareResult.Successful)); messages.Clear(); errorCount = kernelWrapper.Validate(kernelDataInput, kernelDataOutput, out messages); - Assert.IsTrue(errorCount == 0); + Assert.That(errorCount, Is.EqualTo(0)); Assert.That(((MacroStabilityOutput)kernelDataOutput).CalculationResult, Is.EqualTo(CalculationResult.NoRun)); } @@ -431,7 +431,7 @@ // Run the dll kernelWrapper.Execute(kernelDataInput, kernelDataOutput, out List messages); var macroStabilityOutput = (MacroStabilityOutput) kernelDataOutput; - Assert.IsTrue(messages.Count > 0); + Assert.That(messages.Count, Is.GreaterThan(0)); // as there is no data at all, expect unexpected error Assert.That(macroStabilityOutput.CalculationResult, Is.EqualTo(CalculationResult.UnexpectedError)); } @@ -462,15 +462,15 @@ // Validate the input int errorCount = kernelWrapper.Validate(kernelDataInput, kernelDataOutput, out List messages); - Assert.IsTrue(errorCount == 0); + Assert.That(errorCount, Is.EqualTo(0)); // Run the dl; the tangent line position is defined in such a way that this calculation will result in // several failed attempted slip planes so there should be warnings. kernelWrapper.Execute(kernelDataInput, kernelDataOutput, out messages); var macroStabilityOutput = (MacroStabilityOutput) kernelDataOutput; Assert.That(messages.Count, Is.EqualTo(11)); Assert.That(macroStabilityOutput.CalculationResult, Is.EqualTo(CalculationResult.Succeeded)); - Assert.IsTrue(messages[0].Message.Contains("A slice is beyond the geometry at x")); + Assert.That(messages[0].Message, Does.Contain("A slice is beyond the geometry at x")); } [Test] @@ -498,7 +498,7 @@ // Validate the input int errorCount = kernelWrapper.Validate(kernelDataInput, kernelDataOutput, out List messages); - Assert.IsTrue(errorCount == 0); + Assert.That(errorCount, Is.EqualTo(0)); // Run the dll kernelWrapper.Execute(kernelDataInput, kernelDataOutput, out messages); @@ -514,7 +514,7 @@ LocationName = kernelInput.Location.Name }; kernelWrapper.PostProcess(kernelInput, macroStabilityOutput, designScenario, "", out List results); - Assert.IsTrue(results.Count > 0); + Assert.That(results.Count, Is.GreaterThan(0)); foreach (DesignResult result in results) { Assert.That(result.BaseFileName, Is.EqualTo("Loc(TestLocation)_Sce(1)_Pro(DefaultNameSoilProfile1D)")); @@ -607,7 +607,7 @@ LocationName = kernelInput.Location.Name }; kernelWrapper.PostProcess(kernelInput, macroStabilityOutput, designScenario, "", out List results); - Assert.IsTrue(results.Count > 0); + Assert.That(results.Count, Is.GreaterThan(0)); } [Test] @@ -624,7 +624,7 @@ inputString = XmlAdapter.ChangeValueInXml(inputString, "ProjectPath", ""); // Current directory will be used inputString = XmlAdapter.ChangeValueInXml(inputString, "CalculationMap", calcDir); // Current directory will be used var engineInterface = new EngineInterface(inputString); - Assert.IsNotNull(engineInterface.DamProjectData); + Assert.That(engineInterface.DamProjectData, Is.Not.Null); engineInterface.DamProjectData.DamProjectCalculationSpecification.CurrentSpecification.StabilityModelType = MStabModelType.UpliftVan;