Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ImportInfos/PipingCalculationGroupContextImportInfoTest.cs =================================================================== diff -u -r5e2bd16d7268e107ea6d4a1070778a0323044748 -r38e69a97ab7003d46b9ac16660b9cb396308ac47 --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ImportInfos/PipingCalculationGroupContextImportInfoTest.cs (.../PipingCalculationGroupContextImportInfoTest.cs) (revision 5e2bd16d7268e107ea6d4a1070778a0323044748) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ImportInfos/PipingCalculationGroupContextImportInfoTest.cs (.../PipingCalculationGroupContextImportInfoTest.cs) (revision 38e69a97ab7003d46b9ac16660b9cb396308ac47) @@ -98,117 +98,13 @@ } [Test] - public void IsEnabled_NoSurfaceLines_ReturnFalse() + public void IsEnabled_Always_ReturnTrue() { - // Setup - var failureMechanism = new PipingFailureMechanism(); - - var mocks = new MockRepository(); - IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mocks); - mocks.ReplayAll(); - - var context = new PipingCalculationGroupContext(new CalculationGroup(), - Enumerable.Empty(), - new[] - { - new StochasticSoilModel(1, "A", "B") - }, - failureMechanism, - assessmentSection); - // Call - bool isEnabled = importInfo.IsEnabled(context); + bool isEnabled = importInfo.IsEnabled(null); // Assert - Assert.IsFalse(isEnabled); - mocks.VerifyAll(); - } - - [Test] - public void IsEnabled_NoSoilModels_ReturnFalse() - { - // Setup - var failureMechanism = new PipingFailureMechanism(); - - var mocks = new MockRepository(); - IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mocks); - mocks.ReplayAll(); - - var context = new PipingCalculationGroupContext(new CalculationGroup(), - new[] - { - new RingtoetsPipingSurfaceLine() - }, - Enumerable.Empty(), - failureMechanism, - assessmentSection); - - // Call - bool isEnabled = importInfo.IsEnabled(context); - - // Assert - Assert.IsFalse(isEnabled); - mocks.VerifyAll(); - } - - [Test] - public void IsEnabled_NoHydraulicBoundaryDatabase_ReturnFalse() - { - // Setup - var failureMechanism = new PipingFailureMechanism(); - - var mocks = new MockRepository(); - IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStubWithoutBoundaryDatabase(failureMechanism, mocks); - mocks.ReplayAll(); - - var context = new PipingCalculationGroupContext(new CalculationGroup(), - new[] - { - new RingtoetsPipingSurfaceLine() - }, - new[] - { - new StochasticSoilModel(1, "A", "B") - }, - failureMechanism, - assessmentSection); - - // Call - bool isEnabled = importInfo.IsEnabled(context); - - // Assert - Assert.IsFalse(isEnabled); - mocks.VerifyAll(); - } - - [Test] - public void IsEnabled_AllDataAvailable_ReturnTrue() - { - // Setup - var failureMechanism = new PipingFailureMechanism(); - - var mocks = new MockRepository(); - IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mocks); - mocks.ReplayAll(); - - var context = new PipingCalculationGroupContext(new CalculationGroup(), - new[] - { - new RingtoetsPipingSurfaceLine() - }, - new[] - { - new StochasticSoilModel(1, "A", "B") - }, - failureMechanism, - assessmentSection); - - // Call - bool isEnabled = importInfo.IsEnabled(context); - - // Assert Assert.IsTrue(isEnabled); - mocks.VerifyAll(); } [Test]