Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -rf93e79beccdd031927870b2db114c8a140e1e3fd -rd82035163d2c3826a24e898b45e13147edd475a9 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision f93e79beccdd031927870b2db114c8a140e1e3fd) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision d82035163d2c3826a24e898b45e13147edd475a9) @@ -376,10 +376,10 @@ } [Test] - [TestCase(false, false, "De bijdrage van dit toetsspoor is nul.")] - [TestCase(true, false, "De bijdrage van dit toetsspoor is nul.")] - [TestCase(false, true, "Er zijn geen berekeningen geselecteerd.")] - [TestCase(true, true, "")] + [TestCase(false, false, "De bijdrage van dit toetsspoor is nul.", TestName = "CalculateButton_RowSelectionContributionSet_SyncedAccordingly(false, false, message)")] + [TestCase(true, false, "De bijdrage van dit toetsspoor is nul.", TestName = "CalculateButton_RowSelectionContributionSet_SyncedAccordingly(true, false, message)")] + [TestCase(false, true, "Er zijn geen berekeningen geselecteerd.", TestName = "CalculateButton_RowSelectionContributionSet_SyncedAccordingly(false, true, message)")] + [TestCase(true, true, "", TestName = "CalculateButton_RowSelectionContributionSet_SyncedAccordingly(true, true, message)")] public void CalculateForSelectedButton_SpecificCombinationOfRowSelectionAndFailureMechanismContributionSet_ButtonAndErrorMessageSyncedAccordingly(bool rowSelected, bool contributionNotZero, string expectedErrorMessage) { // Setup & Call Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs =================================================================== diff -u -rf93e79beccdd031927870b2db114c8a140e1e3fd -rd82035163d2c3826a24e898b45e13147edd475a9 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision f93e79beccdd031927870b2db114c8a140e1e3fd) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision d82035163d2c3826a24e898b45e13147edd475a9) @@ -371,10 +371,10 @@ } [Test] - [TestCase(false, false, "De bijdrage van dit toetsspoor is nul.")] - [TestCase(true, false, "De bijdrage van dit toetsspoor is nul.")] - [TestCase(false, true, "Er zijn geen berekeningen geselecteerd.")] - [TestCase(true, true, "")] + [TestCase(false, false, "De bijdrage van dit toetsspoor is nul.", TestName = "CalculateButton_RowSelectionContributionSet_SyncedAccordingly(false, false, message)")] + [TestCase(true, false, "De bijdrage van dit toetsspoor is nul.", TestName = "CalculateButton_RowSelectionContributionSet_SyncedAccordingly(true, false, message)")] + [TestCase(false, true, "Er zijn geen berekeningen geselecteerd.", TestName = "CalculateButton_RowSelectionContributionSet_SyncedAccordingly(false, true, message)")] + [TestCase(true, true, "", TestName = "CalculateButton_RowSelectionContributionSet_SyncedAccordingly(true, true, message)")] public void CalculateForSelectedButton_SpecificCombinationOfRowSelectionAndFailureMechanismContributionSet_ButtonAndErrorMessageSyncedAccordingly(bool rowSelected, bool contributionNotZero, string expectedErrorMessage) { // Setup & Call Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewIntegrationTest.cs =================================================================== diff -u -r70c6d25383da91912edb6e26dfcb748b1fe361ae -rd82035163d2c3826a24e898b45e13147edd475a9 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewIntegrationTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewIntegrationTest.cs) (revision 70c6d25383da91912edb6e26dfcb748b1fe361ae) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewIntegrationTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewIntegrationTest.cs) (revision d82035163d2c3826a24e898b45e13147edd475a9) @@ -36,11 +36,13 @@ } [Test] - [TestCase(false, false, "De bijdrage van dit toetsspoor is nul.")] - [TestCase(true, false, "De bijdrage van dit toetsspoor is nul.")] - [TestCase(false, true, "Er zijn geen berekeningen geselecteerd.")] - [TestCase(true, true, "")] - public void CalculateForSelectedButton_FailureMechanismContributionChanged_ButtonAndErrorMessageSyncedAccordingly(bool rowSelected, bool contributionAfterChangeNotZero, string expectedErrorMessage) + [TestCase(false, false, "De bijdrage van dit toetsspoor is nul.", TestName = "CalculateButton_ContributionChanged_SyncedAccordingly(false, false, message)")] + [TestCase(true, false, "De bijdrage van dit toetsspoor is nul.", TestName = "CalculateButton_ContributionChanged_SyncedAccordingly(true, false, message)")] + [TestCase(false, true, "Er zijn geen berekeningen geselecteerd.", TestName = "CalculateButton_ContributionChanged_SyncedAccordingly(false, true, message)")] + [TestCase(true, true, "", TestName = "CalculateButton_ContributionChanged_SyncedAccordingly(true, true, message)")] + public void CalculateForSelectedButton_FailureMechanismContributionChanged_ButtonAndErrorMessageSyncedAccordingly(bool rowSelected, + bool contributionAfterChangeNotZero, + string expectedErrorMessage) { // Setup GrassCoverErosionOutwardsDesignWaterLevelLocationsView view = ShowFullyConfiguredDesignWaterLevelLocationsView(); Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsWaveHeightLocationsViewIntegrationTest.cs =================================================================== diff -u -rf93e79beccdd031927870b2db114c8a140e1e3fd -rd82035163d2c3826a24e898b45e13147edd475a9 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsWaveHeightLocationsViewIntegrationTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewIntegrationTest.cs) (revision f93e79beccdd031927870b2db114c8a140e1e3fd) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsWaveHeightLocationsViewIntegrationTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewIntegrationTest.cs) (revision d82035163d2c3826a24e898b45e13147edd475a9) @@ -36,10 +36,10 @@ } [Test] - [TestCase(false, false, "De bijdrage van dit toetsspoor is nul.")] - [TestCase(true, false, "De bijdrage van dit toetsspoor is nul.")] - [TestCase(false, true, "Er zijn geen berekeningen geselecteerd.")] - [TestCase(true, true, "")] + [TestCase(false, false, "De bijdrage van dit toetsspoor is nul.", TestName = "CalculateButton_ContributionChanged_SyncedAccordingly(false, false, message)")] + [TestCase(true, false, "De bijdrage van dit toetsspoor is nul.", TestName = "CalculateButton_ContributionChanged_SyncedAccordingly(true, false, message)")] + [TestCase(false, true, "Er zijn geen berekeningen geselecteerd.", TestName = "CalculateButton_ContributionChanged_SyncedAccordingly(false, true, message)")] + [TestCase(true, true, "", TestName = "CalculateButton_ContributionChanged_SyncedAccordingly(true, true, message)")] public void CalculateForSelectedButton_FailureMechanismContributionChanged_ButtonAndErrorMessageSyncedAccordingly(bool rowSelected, bool contributionAfterChangeNotZero, string expectedErrorMessage) { // Setup Index: Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/RingtoetsDataSynchronizationServiceTest.cs =================================================================== diff -u -r178bbc2c5f319a03f6272570fe3668e70bd6dc8c -rd82035163d2c3826a24e898b45e13147edd475a9 --- Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/RingtoetsDataSynchronizationServiceTest.cs (.../RingtoetsDataSynchronizationServiceTest.cs) (revision 178bbc2c5f319a03f6272570fe3668e70bd6dc8c) +++ Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/RingtoetsDataSynchronizationServiceTest.cs (.../RingtoetsDataSynchronizationServiceTest.cs) (revision d82035163d2c3826a24e898b45e13147edd475a9) @@ -356,7 +356,7 @@ } [Test] - [TestCaseSource(nameof(GrassAndDuneLocations))] + [TestCaseSource(nameof(GrassAndDuneLocations2))] public void ClearHydraulicBoundaryLocationOutputForFailureMechanisms_FailureMechanismsGrassCoverErosionOutwardsAndDuneLocations_ClearDataAndReturnAffectedLocations(HydraulicBoundaryLocation grassCoverErosionLocation, DuneLocation duneLocation, IEnumerable expectedAffectedItems) @@ -475,7 +475,7 @@ } [Test] - [TestCaseSource(nameof(FailureMechanisms))] + [TestCaseSource(nameof(FailureMechanisms2))] public void GetHydraulicBoundaryLocationCollectionsOfFailureMechanisms_FailureMechanismsGrassCoverOutwardsAndDuneLocations_ReturnsExpectedAffectedCollections(IEnumerable availableFailureMechanisms, IEnumerable expectedCollections) { @@ -1532,7 +1532,7 @@ { grassBoundaryLocationWithOutput } - ).SetName("GrassLocationWithOutput"); + ).SetName("DuneLocationWithoutOutputGrassLocationWithOutput"); yield return new TestCaseData( new TestHydraulicBoundaryLocation(), duneLocationWithOutput = new TestDuneLocation @@ -1543,7 +1543,7 @@ { duneLocationWithOutput } - ).SetName("DuneLocationWithOutput"); + ).SetName("GrassLocationWithoutOutputDuneLocationWithOutput"); yield return new TestCaseData( grassBoundaryLocationWithOutput = TestHydraulicBoundaryLocation.CreateFullyCalculated(), duneLocationWithOutput = new TestDuneLocation @@ -1559,6 +1559,52 @@ } } + private static IEnumerable GrassAndDuneLocations2 + { + get + { + TestDuneLocation duneLocationWithOutput; + TestHydraulicBoundaryLocation grassBoundaryLocationWithOutput; + + yield return new TestCaseData( + new TestHydraulicBoundaryLocation(), + new TestDuneLocation(), + new IObservable[0] + ).SetName("GrassAndDuneLocationNoOutput2"); + yield return new TestCaseData( + grassBoundaryLocationWithOutput = TestHydraulicBoundaryLocation.CreateFullyCalculated(), + new TestDuneLocation(), + new IObservable[] + { + grassBoundaryLocationWithOutput + } + ).SetName("GrassLocationWithOutput2"); + yield return new TestCaseData( + new TestHydraulicBoundaryLocation(), + duneLocationWithOutput = new TestDuneLocation + { + Output = new TestDuneLocationOutput() + }, + new IObservable[] + { + duneLocationWithOutput + } + ).SetName("DuneLocationWithOutput2"); + yield return new TestCaseData( + grassBoundaryLocationWithOutput = TestHydraulicBoundaryLocation.CreateFullyCalculated(), + duneLocationWithOutput = new TestDuneLocation + { + Output = new TestDuneLocationOutput() + }, + new IObservable[] + { + grassBoundaryLocationWithOutput, + duneLocationWithOutput + } + ).SetName("GrassAndDuneLocationWithOutput2"); + } + } + private static IEnumerable HydraulicBoundaryLocationAndGrassAndDuneLocations { get @@ -1620,7 +1666,7 @@ new IObservable[] { duneLocationWithOutput - }).SetName("DuneLocationWithOutput"); + }).SetName("HydraulicBoundaryLocationWithoutOutputDuneLocationWithOutput"); yield return new TestCaseData( new TestHydraulicBoundaryLocation(), new TestHydraulicBoundaryLocation(), @@ -1638,7 +1684,7 @@ { grassCoverErosionOutwardsLocation, duneLocationWithOutput - }).SetName("GrassAndDuneLocationWithOutput"); + }).SetName("HydraulicBoundaryLocationWithoutOutputGrassAndDuneLocationWithOutput"); yield return new TestCaseData( new TestHydraulicBoundaryLocation(), grassCoverErosionOutwardsLocation = TestHydraulicBoundaryLocation.CreateFullyCalculated(), @@ -1698,6 +1744,54 @@ } } + private static IEnumerable FailureMechanisms2 + { + get + { + DuneErosionFailureMechanism duneErosionFailureMechanism; + GrassCoverErosionOutwardsFailureMechanism grassCoverErosionOutwardsFailureMechanism; + + yield return new TestCaseData( + new IFailureMechanism[] + { + new TestFailureMechanism(), + duneErosionFailureMechanism = new DuneErosionFailureMechanism(), + grassCoverErosionOutwardsFailureMechanism = new GrassCoverErosionOutwardsFailureMechanism() + }, + new IObservable[] + { + grassCoverErosionOutwardsFailureMechanism.HydraulicBoundaryLocations, + duneErosionFailureMechanism.DuneLocations + }).SetName("DuneAndGrassFailureMechanism2"); + yield return new TestCaseData( + new IFailureMechanism[] + { + new TestFailureMechanism() + }, + new IObservable[0]).SetName("NoRelevantFailureMechanism2"); + yield return new TestCaseData( + new IFailureMechanism[] + { + new TestFailureMechanism(), + duneErosionFailureMechanism = new DuneErosionFailureMechanism(), + }, + new IObservable[] + { + duneErosionFailureMechanism.DuneLocations + }).SetName("DuneFailureMechanism2"); + yield return new TestCaseData( + new IFailureMechanism[] + { + new TestFailureMechanism(), + grassCoverErosionOutwardsFailureMechanism = new GrassCoverErosionOutwardsFailureMechanism() + }, + new IObservable[] + { + grassCoverErosionOutwardsFailureMechanism.HydraulicBoundaryLocations + }).SetName("GrassFailureMechanism2"); + } + } + #endregion } } \ No newline at end of file