Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs =================================================================== diff -u -r5b63cfab474523f97be999403eb4906a0c376a3d -r906395ea30454f0ebbfcd04ad15574a443d1524f --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 5b63cfab474523f97be999403eb4906a0c376a3d) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 906395ea30454f0ebbfcd04ad15574a443d1524f) @@ -93,17 +93,6 @@ AssertHydraulicBoundaryDatabase(firstProjectDike[i], secondProjectDike[i]); AssertReferenceLine(firstProjectDike[i], secondProjectDike[i]); } - - var firstProjectDune = firstProject.Items.OfType().ToList(); - var secondProjectDune = secondProject.Items.OfType().ToList(); - Assert.AreEqual(firstProjectDune.Count, secondProjectDune.Count); - for (var i = 0; i < firstProjectDune.Count; i++) - { - Assert.AreEqual(firstProjectDune[i].StorageId, secondProjectDune[i].StorageId); - Assert.AreEqual(firstProjectDune[i].Name, secondProjectDune[i].Name); - - AssertHydraulicBoundaryDatabase(firstProjectDune[i], secondProjectDune[i]); - } } [Test] Fisheye: Tag 906395ea30454f0ebbfcd04ad15574a443d1524f refers to a dead (removed) revision in file `Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoDuneAssessmentSectionCommand.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj =================================================================== diff -u -r44055100aa3c3f382227becdaeae7d97c75d386c -r906395ea30454f0ebbfcd04ad15574a443d1524f --- Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj (.../Demo.Ringtoets.csproj) (revision 44055100aa3c3f382227becdaeae7d97c75d386c) +++ Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj (.../Demo.Ringtoets.csproj) (revision 906395ea30454f0ebbfcd04ad15574a443d1524f) @@ -51,7 +51,6 @@ Properties\GlobalAssembly.cs - Index: Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml =================================================================== diff -u -r96fff35cedc43c8be2da620efa3d1b9cb3e42238 -r906395ea30454f0ebbfcd04ad15574a443d1524f --- Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml (.../RingtoetsDemoProjectRibbon.xaml) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238) +++ Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml (.../RingtoetsDemoProjectRibbon.xaml) (revision 906395ea30454f0ebbfcd04ad15574a443d1524f) @@ -22,11 +22,10 @@ - - + - + Index: Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml.cs =================================================================== diff -u -r96fff35cedc43c8be2da620efa3d1b9cb3e42238 -r906395ea30454f0ebbfcd04ad15574a443d1524f --- Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml.cs (.../RingtoetsDemoProjectRibbon.xaml.cs) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238) +++ Demo/Ringtoets/src/Demo.Ringtoets/Ribbons/RingtoetsDemoProjectRibbon.xaml.cs (.../RingtoetsDemoProjectRibbon.xaml.cs) (revision 906395ea30454f0ebbfcd04ad15574a443d1524f) @@ -13,14 +13,13 @@ /// public partial class RingtoetsDemoProjectRibbon : IRibbonCommandHandler { - private readonly ICommand addNewDikeAssessmentSection, addNewDuneAssessmentSection, openMapViewCommand, openChartViewCommand; + private readonly ICommand addNewDikeAssessmentSection, openMapViewCommand, openChartViewCommand; public RingtoetsDemoProjectRibbon(IProjectOwner projectOwner, IDocumentViewController documentViewController) { InitializeComponent(); addNewDikeAssessmentSection = new AddNewDemoDikeAssessmentSectionCommand(projectOwner); - addNewDuneAssessmentSection = new AddNewDemoDuneAssessmentSectionCommand(projectOwner); openChartViewCommand = new OpenChartViewCommand(documentViewController); openMapViewCommand = new OpenMapViewCommand(documentViewController); } @@ -30,7 +29,6 @@ get { yield return addNewDikeAssessmentSection; - yield return addNewDuneAssessmentSection; yield return openChartViewCommand; yield return openMapViewCommand; } @@ -53,11 +51,6 @@ addNewDikeAssessmentSection.Execute(); } - private void AddNewDemoDuneAssessmentSectionButton_Click(object sender, RoutedEventArgs e) - { - addNewDuneAssessmentSection.Execute(); - } - private void ButtonOpenChartView_Click(object sender, RoutedEventArgs e) { openChartViewCommand.Execute(); Fisheye: Tag 906395ea30454f0ebbfcd04ad15574a443d1524f refers to a dead (removed) revision in file `Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoDuneAssessmentSectionCommandTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Demo.Ringtoets.Test.csproj =================================================================== diff -u -r10779bb6a6db2d00f4627b2bc190e7e35e1fee3e -r906395ea30454f0ebbfcd04ad15574a443d1524f --- Demo/Ringtoets/test/Demo.Ringtoets.Test/Demo.Ringtoets.Test.csproj (.../Demo.Ringtoets.Test.csproj) (revision 10779bb6a6db2d00f4627b2bc190e7e35e1fee3e) +++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Demo.Ringtoets.Test.csproj (.../Demo.Ringtoets.Test.csproj) (revision 906395ea30454f0ebbfcd04ad15574a443d1524f) @@ -61,7 +61,6 @@ - Fisheye: Tag 906395ea30454f0ebbfcd04ad15574a443d1524f refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.Data/DuneAssessmentSection.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj =================================================================== diff -u -r44055100aa3c3f382227becdaeae7d97c75d386c -r906395ea30454f0ebbfcd04ad15574a443d1524f --- Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj (.../Ringtoets.Integration.Data.csproj) (revision 44055100aa3c3f382227becdaeae7d97c75d386c) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj (.../Ringtoets.Integration.Data.csproj) (revision 906395ea30454f0ebbfcd04ad15574a443d1524f) @@ -41,7 +41,6 @@ Properties\GlobalAssembly.cs - Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsApplicationPlugin.cs =================================================================== diff -u -rb79e419a1fcdf3d80760ea4bc35ac354525911d2 -r906395ea30454f0ebbfcd04ad15574a443d1524f --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsApplicationPlugin.cs (.../RingtoetsApplicationPlugin.cs) (revision b79e419a1fcdf3d80760ea4bc35ac354525911d2) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsApplicationPlugin.cs (.../RingtoetsApplicationPlugin.cs) (revision 906395ea30454f0ebbfcd04ad15574a443d1524f) @@ -56,19 +56,6 @@ return dikeAssessmentSection; } }; - yield return new DataItemInfo - { - Name = RingtoetsFormsResources.DuneAssessmentSection_DisplayName, - Category = RingtoetsCommonFormsResources.Ringtoets_Category, - Image = RingtoetsFormsResources.AssessmentSectionFolderIcon, - CreateData = owner => - { - var project = (Project) owner; - var duneAssessmentSection = new DuneAssessmentSection(); - duneAssessmentSection.Name = GetUniqueForAssessmentSectionName(project, duneAssessmentSection.Name); - return duneAssessmentSection; - } - }; } public override IEnumerable GetFileImporters() Fisheye: Tag 906395ea30454f0ebbfcd04ad15574a443d1524f refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/DuneAssessmentSectionTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj =================================================================== diff -u -r10779bb6a6db2d00f4627b2bc190e7e35e1fee3e -r906395ea30454f0ebbfcd04ad15574a443d1524f --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj (.../Ringtoets.Integration.Data.Test.csproj) (revision 10779bb6a6db2d00f4627b2bc190e7e35e1fee3e) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj (.../Ringtoets.Integration.Data.Test.csproj) (revision 906395ea30454f0ebbfcd04ad15574a443d1524f) @@ -53,7 +53,6 @@ - Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsApplicationPluginTest.cs =================================================================== diff -u -rb79e419a1fcdf3d80760ea4bc35ac354525911d2 -r906395ea30454f0ebbfcd04ad15574a443d1524f --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsApplicationPluginTest.cs (.../RingtoetsApplicationPluginTest.cs) (revision b79e419a1fcdf3d80760ea4bc35ac354525911d2) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsApplicationPluginTest.cs (.../RingtoetsApplicationPluginTest.cs) (revision 906395ea30454f0ebbfcd04ad15574a443d1524f) @@ -37,21 +37,14 @@ var dataItemDefinitions = plugin.GetDataItemInfos().ToArray(); // assert - Assert.AreEqual(2, dataItemDefinitions.Length); + Assert.AreEqual(1, dataItemDefinitions.Length); DataItemInfo dikeAssessmentSectionDataItemDefinition = dataItemDefinitions.Single(did => did.ValueType == typeof(DikeAssessmentSection)); Assert.AreEqual("Dijktraject", dikeAssessmentSectionDataItemDefinition.Name); Assert.AreEqual("Algemeen", dikeAssessmentSectionDataItemDefinition.Category); TestHelper.AssertImagesAreEqual(RingtoetsFormsResources.AssessmentSectionFolderIcon, dikeAssessmentSectionDataItemDefinition.Image); Assert.IsNull(dikeAssessmentSectionDataItemDefinition.AdditionalOwnerCheck); Assert.IsInstanceOf(dikeAssessmentSectionDataItemDefinition.CreateData(new Project())); - - DataItemInfo duneAssessmentDataItemDefinition = dataItemDefinitions.Single(did => did.ValueType == typeof(DuneAssessmentSection)); - Assert.AreEqual("Duintraject", duneAssessmentDataItemDefinition.Name); - Assert.AreEqual("Algemeen", duneAssessmentDataItemDefinition.Category); - TestHelper.AssertImagesAreEqual(RingtoetsFormsResources.AssessmentSectionFolderIcon, duneAssessmentDataItemDefinition.Image); - Assert.IsNull(duneAssessmentDataItemDefinition.AdditionalOwnerCheck); - Assert.IsInstanceOf(duneAssessmentDataItemDefinition.CreateData(new Project())); } [Test] @@ -70,50 +63,28 @@ } [Test] - [TestCase(AssessmentSectionType.Dike)] - [TestCase(AssessmentSectionType.Dune)] - public void WhenAddingAssessmentSection_GivenProjectHasAssessmentSection_ThenAddedAssessmentSectionHasUniqueName(AssessmentSectionType type) + public void WhenAddingAssessmentSection_GivenProjectHasAssessmentSection_ThenAddedAssessmentSectionHasUniqueName() { // Setup var project = new Project(); var plugin = new RingtoetsApplicationPlugin(); - AddAssessmentSectionToProject(project, plugin, type); + AddAssessmentSectionToProject(project, plugin); // Call - AddAssessmentSectionToProject(project, plugin, type); + AddAssessmentSectionToProject(project, plugin); // Assert CollectionAssert.AllItemsAreUnique(project.Items.Cast().Select(section => section.Name)); } - private void AddAssessmentSectionToProject(Project project, RingtoetsApplicationPlugin plugin, AssessmentSectionType type) + private void AddAssessmentSectionToProject(Project project, RingtoetsApplicationPlugin plugin) { - object itemToAdd = null; - switch (type) - { - case AssessmentSectionType.Dike: - itemToAdd = plugin.GetDataItemInfos().First(di => di.ValueType == typeof(DikeAssessmentSection)).CreateData(project); - break; - case AssessmentSectionType.Dune: - itemToAdd = plugin.GetDataItemInfos().First(di => di.ValueType == typeof(DuneAssessmentSection)).CreateData(project); - break; - } + var itemToAdd = plugin.GetDataItemInfos() + .First(di => di.ValueType == typeof(DikeAssessmentSection)) + .CreateData(project); project.Items.Add(itemToAdd); } - - public enum AssessmentSectionType - { - /// - /// Type value representing instances. - /// - Dike, - - /// - /// Type value representing instances. - /// - Dune - } } } \ No newline at end of file