Index: Application/Ringtoets/src/Application.Ringtoets.Migration/Resources/DatabaseStructure17.1.sql =================================================================== diff -u -ra26f8ba0067df146397c8505ec9dc98dda1c94fd -r03a263822252a5020135a7de96ea8e50d5eb5cc6 --- Application/Ringtoets/src/Application.Ringtoets.Migration/Resources/DatabaseStructure17.1.sql (.../DatabaseStructure17.1.sql) (revision a26f8ba0067df146397c8505ec9dc98dda1c94fd) +++ Application/Ringtoets/src/Application.Ringtoets.Migration/Resources/DatabaseStructure17.1.sql (.../DatabaseStructure17.1.sql) (revision 03a263822252a5020135a7de96ea8e50d5eb5cc6) @@ -1,6 +1,6 @@ /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.0 */ -/* Created On : 12-Jan-2017 2:31:23 PM */ +/* Created On : 31-Jan-2017 10:19:09 */ /* DBMS : SQLite */ /* ---------------------------------------------------- */ @@ -204,6 +204,9 @@ DROP TABLE IF EXISTS 'DuneLocationOutputEntity' ; +DROP TABLE IF EXISTS 'BackgroundMapDataEntity' +; + /* Create Tables with Primary and Foreign Keys, Check and Unique Constraints */ CREATE TABLE 'VersionEntity' @@ -1328,6 +1331,20 @@ ) ; +CREATE TABLE 'BackgroundMapDataEntity' +( + 'BackgroundMapDataEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + 'AssessmentSectionEntityId' INTEGER NOT NULL, + 'Name' TEXT NOT NULL, + 'SourceCapabilitiesUrl' TEXT, + 'SelectedCapabilityName' TEXT, + 'PreferredFormat' VARCHAR (255), + 'IsVisible' TINYINT (1) NOT NULL, -- true or false + 'Transparency' REAL NOT NULL, + CONSTRAINT 'FK_WmtsMapDataEntity_AssessmentSectionEntity' FOREIGN KEY ('AssessmentSectionEntityId') REFERENCES 'AssessmentSectionEntity' ('AssessmentSectionEntityId') ON DELETE Cascade ON UPDATE Cascade +) +; + /* Create Indexes and Triggers */ CREATE INDEX 'IXFK_GrassCoverErosionInwardsDikeHeightOutputEntity_GrassCoverErosionInwardsOutputEntity' @@ -1681,3 +1698,7 @@ CREATE INDEX 'IXFK_DuneLocationOutputEntity_DuneLocationEntity' ON 'DuneLocationOutputEntity' ('DuneLocationEntityId' ASC) ; + +CREATE INDEX 'IXFK_WmtsMapDataEntity_AssessmentSectionEntity' + ON 'BackgroundMapDataEntity' ('AssessmentSectionEntityId' ASC) +; Index: Application/Ringtoets/src/Application.Ringtoets.Migration/Resources/Migration_4_17.1.sql =================================================================== diff -u -ra26f8ba0067df146397c8505ec9dc98dda1c94fd -r03a263822252a5020135a7de96ea8e50d5eb5cc6 --- Application/Ringtoets/src/Application.Ringtoets.Migration/Resources/Migration_4_17.1.sql (.../Migration_4_17.1.sql) (revision a26f8ba0067df146397c8505ec9dc98dda1c94fd) +++ Application/Ringtoets/src/Application.Ringtoets.Migration/Resources/Migration_4_17.1.sql (.../Migration_4_17.1.sql) (revision 03a263822252a5020135a7de96ea8e50d5eb5cc6) @@ -96,9 +96,19 @@ INSERT INTO DuneErosionFailureMechanismMetaEntity ( [FailureMechanismEntityId], [N]) -Select FailureMechanismEntityId, +SELECT FailureMechanismEntityId, 2.0 FROM FailureMechanismEntity WHERE FailureMechanismType = 8 LIMIT 1; +INSERT INTO BackgroundMapDataEntity ( + [AssessmentSectionEntityId], + [Name], + [IsVisible], + [Transparency]) +SELECT AssessmentSectionEntityId, + "", + 0, + 0.0 + FROM AssessmentSectionEntity; DETACH SOURCEPROJECT; PRAGMA foreign_keys = ON; \ No newline at end of file Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/AssessmentSectionCreateExtensions.cs =================================================================== diff -u -ra26f8ba0067df146397c8505ec9dc98dda1c94fd -r03a263822252a5020135a7de96ea8e50d5eb5cc6 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/AssessmentSectionCreateExtensions.cs (.../AssessmentSectionCreateExtensions.cs) (revision a26f8ba0067df146397c8505ec9dc98dda1c94fd) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/AssessmentSectionCreateExtensions.cs (.../AssessmentSectionCreateExtensions.cs) (revision 03a263822252a5020135a7de96ea8e50d5eb5cc6) @@ -78,6 +78,8 @@ AddEntityForHydraulicDatabase(section, entity, registry); AddEntityForReferenceLine(section, entity); + entity.BackgroundMapDataEntities.Add(section.BackgroundMapData.Create()); + entity.FailureMechanismEntities.Add(section.PipingFailureMechanism.Create(registry)); entity.FailureMechanismEntities.Add(section.GrassCoverErosionInwards.Create(registry)); entity.FailureMechanismEntities.Add(section.HeightStructures.Create(registry)); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/AssessmentSectionEntityReadExtensions.cs =================================================================== diff -u -r539d342dcf52309b4cb05b7cf49ded99c122d44f -r03a263822252a5020135a7de96ea8e50d5eb5cc6 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/AssessmentSectionEntityReadExtensions.cs (.../AssessmentSectionEntityReadExtensions.cs) (revision 539d342dcf52309b4cb05b7cf49ded99c122d44f) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/AssessmentSectionEntityReadExtensions.cs (.../AssessmentSectionEntityReadExtensions.cs) (revision 03a263822252a5020135a7de96ea8e50d5eb5cc6) @@ -65,6 +65,8 @@ } }; + entity.ReadBackgroundMapData(assessmentSection); + entity.ReadHydraulicDatabase(assessmentSection, collector); entity.ReadReferenceLine(assessmentSection); @@ -104,6 +106,23 @@ GC.Collect(); } + private static void ReadBackgroundMapData(this AssessmentSectionEntity entity, IAssessmentSection assessmentSection) + { + var backgroundMapData = entity.BackgroundMapDataEntities.Single().Read(); + + assessmentSection.BackgroundMapData.Name = backgroundMapData.Name; + + if (backgroundMapData.IsConfigured) + { + assessmentSection.BackgroundMapData.Configure(backgroundMapData.SourceCapabilitiesUrl, + backgroundMapData.SelectedCapabilityIdentifier, + backgroundMapData.PreferredFormat); + } + + assessmentSection.BackgroundMapData.IsVisible = backgroundMapData.IsVisible; + assessmentSection.BackgroundMapData.Transparency = backgroundMapData.Transparency; + } + private static void ReadReferenceLine(this AssessmentSectionEntity entity, IAssessmentSection assessmentSection) { if (entity.ReferenceLinePointXml != null) Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/BackgroundMapDataEntityReadExtensions.cs =================================================================== diff -u -r9724ee9c253738d65bab64c26e567d4ae58dd086 -r03a263822252a5020135a7de96ea8e50d5eb5cc6 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/BackgroundMapDataEntityReadExtensions.cs (.../BackgroundMapDataEntityReadExtensions.cs) (revision 9724ee9c253738d65bab64c26e567d4ae58dd086) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/BackgroundMapDataEntityReadExtensions.cs (.../BackgroundMapDataEntityReadExtensions.cs) (revision 03a263822252a5020135a7de96ea8e50d5eb5cc6) @@ -49,14 +49,18 @@ throw new ArgumentNullException(nameof(entity)); } - return new WmtsMapData(entity.Name, - entity.SourceCapabilitiesUrl, - entity.SelectedCapabilityName, - entity.PreferredFormat) + var mapData = WmtsMapData.CreateUnconnectedMapData(); + mapData.Name = entity.Name; + + if (entity.SourceCapabilitiesUrl != null && entity.SelectedCapabilityName != null && entity.PreferredFormat != null) { - IsVisible = Convert.ToBoolean(entity.IsVisible), - Transparency = (RoundedDouble) entity.Transparency - }; + mapData.Configure(entity.SourceCapabilitiesUrl, entity.SelectedCapabilityName, entity.PreferredFormat); + } + + mapData.IsVisible = Convert.ToBoolean(entity.IsVisible); + mapData.Transparency = (RoundedDouble)entity.Transparency; + + return mapData; } } } \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs =================================================================== diff -u -r545b105a213ed85564861b4bcf6d2d6425dbde50 -r03a263822252a5020135a7de96ea8e50d5eb5cc6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs (.../AssessmentSectionCreateExtensionsTest.cs) (revision 545b105a213ed85564861b4bcf6d2d6425dbde50) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs (.../AssessmentSectionCreateExtensionsTest.cs) (revision 03a263822252a5020135a7de96ea8e50d5eb5cc6) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.Create; using Application.Ringtoets.Storage.DbContext; using Application.Ringtoets.Storage.Serializers; +using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Framework; using Ringtoets.Common.Data.AssessmentSection; @@ -64,6 +65,10 @@ const string comments = "Some text"; const double norm = 0.05; int order = new Random(65).Next(); + + const string mapDataName = "map data name"; + const double transparency = 0.3; + const bool isVisible = true; var assessmentSection = new AssessmentSection(assessmentSectionComposition) { Id = testId, @@ -75,6 +80,12 @@ FailureMechanismContribution = { Norm = norm + }, + BackgroundMapData = + { + Name = mapDataName, + Transparency = (RoundedDouble) transparency, + IsVisible = isVisible } }; var registry = new PersistenceRegistry(); @@ -115,6 +126,16 @@ Assert.IsEmpty(entity.HydraulicLocationEntities); Assert.IsNull(entity.ReferenceLinePointXml); + + Assert.AreEqual(1, entity.BackgroundMapDataEntities.Count); + var backgroundMapDataEntity = entity.BackgroundMapDataEntities.Single(); + Assert.IsNotNull(backgroundMapDataEntity); + Assert.AreEqual(mapDataName, backgroundMapDataEntity.Name); + Assert.AreEqual(transparency, backgroundMapDataEntity.Transparency); + Assert.AreEqual(Convert.ToByte(isVisible), backgroundMapDataEntity.IsVisible); + Assert.IsNull(backgroundMapDataEntity.SelectedCapabilityName); + Assert.IsNull(backgroundMapDataEntity.SourceCapabilitiesUrl); + Assert.IsNull(backgroundMapDataEntity.PreferredFormat); } [Test] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs =================================================================== diff -u -r6aaa17dbb25d6299115d68b221312aa1482d97a9 -r03a263822252a5020135a7de96ea8e50d5eb5cc6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs (.../AssessmentSectionEntityReadExtensionsTest.cs) (revision 6aaa17dbb25d6299115d68b221312aa1482d97a9) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs (.../AssessmentSectionEntityReadExtensionsTest.cs) (revision 03a263822252a5020135a7de96ea8e50d5eb5cc6) @@ -28,6 +28,7 @@ using Core.Common.Base; using Core.Common.Base.Geometry; using Core.Common.TestUtil; +using Core.Components.Gis.Data; using NUnit.Framework; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; @@ -73,6 +74,8 @@ Comments = comments, Norm = norm }; + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); + var collector = new ReadConversionCollector(); // Call @@ -90,6 +93,63 @@ } [Test] + [TestCase(false)] + [TestCase(true)] + public void Read_WithBackgroundMapData_ReturnnewAssessmentSectionWithBackgroundMapData(bool isConfigured) + { + // Setup + const string mapDataName = "Background"; + const double transparency = 0.0; + bool isVisible = isConfigured; + + const string sourceCapabilitiesUrl = "//url"; + const string selectedCapabilityName = "selected name"; + const string preferredFormat = "image/png"; + + var entity = CreateAssessmentSectionEntity(); + BackgroundMapDataEntity backgroundMapDataEntity = new BackgroundMapDataEntity + { + Name = mapDataName, + Transparency = transparency, + IsVisible = Convert.ToByte(isVisible) + }; + + if (isConfigured) + { + backgroundMapDataEntity.SourceCapabilitiesUrl = sourceCapabilitiesUrl; + backgroundMapDataEntity.SelectedCapabilityName = selectedCapabilityName; + backgroundMapDataEntity.PreferredFormat = preferredFormat; + } + + entity.BackgroundMapDataEntities.Add(backgroundMapDataEntity); + + var collector = new ReadConversionCollector(); + + // Call + var section = entity.Read(collector); + + // Assert + WmtsMapData backgroundMapData = section.BackgroundMapData; + Assert.AreEqual(isConfigured, backgroundMapData.IsConfigured); + Assert.AreEqual(mapDataName, backgroundMapData.Name); + Assert.AreEqual(isVisible, backgroundMapData.IsVisible); + Assert.AreEqual(transparency, backgroundMapData.Transparency); + + if (isConfigured) + { + Assert.AreEqual(sourceCapabilitiesUrl, backgroundMapData.SourceCapabilitiesUrl); + Assert.AreEqual(selectedCapabilityName, backgroundMapData.SelectedCapabilityIdentifier); + Assert.AreEqual(preferredFormat, backgroundMapData.PreferredFormat); + } + else + { + Assert.IsNull(backgroundMapData.SourceCapabilitiesUrl); + Assert.IsNull(backgroundMapData.SelectedCapabilityIdentifier); + Assert.IsNull(backgroundMapData.PreferredFormat); + } + } + + [Test] public void Read_WithReferenceLineEntities_ReturnsNewAssessmentSectionWithReferenceLineSet() { // Setup @@ -107,6 +167,7 @@ new Point2D(secondX, secondY) }; entity.ReferenceLinePointXml = new Point2DXmlSerializer().ToXml(points); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -138,6 +199,7 @@ Name = "B", Order = 0 }); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -185,6 +247,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -231,6 +294,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -270,6 +334,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -309,6 +374,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -348,6 +414,7 @@ }); entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -387,6 +454,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -433,6 +501,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -465,6 +534,7 @@ CalculationGroupEntity = rootGroupEntity }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -504,6 +574,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -550,6 +621,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -597,6 +669,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -633,6 +706,7 @@ NotRelevantComments = notRelevantComments }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -671,6 +745,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -714,6 +789,7 @@ IsRelevant = Convert.ToByte(isRelevant) }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -750,6 +826,7 @@ NotRelevantComments = notRelevantComments }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -792,6 +869,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -832,6 +910,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -871,6 +950,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -912,6 +992,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -953,6 +1034,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -993,6 +1075,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -1025,6 +1108,7 @@ } }; entity.FailureMechanismEntities.Add(failureMechanismEntity); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -1068,6 +1152,7 @@ entity.FailureMechanismEntities.Add(grassRevetmentSlidingOutwards); entity.FailureMechanismEntities.Add(grassRevetmentSlidingInwards); entity.FailureMechanismEntities.Add(technicalInnovations); + entity.BackgroundMapDataEntities.Add(CreateBackgroundMapDataEntity()); var collector = new ReadConversionCollector(); @@ -1108,6 +1193,16 @@ }; } + private static BackgroundMapDataEntity CreateBackgroundMapDataEntity() + { + return new BackgroundMapDataEntity + { + Name = "Background", + Transparency = 0.0, + IsVisible = 0 + }; + } + private static FailureMechanismEntity CreateFailureMechanismEntity(bool isRelevant, FailureMechanismType failureMechanismType) { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/BackgroundMapDataEntityReadExtensionsTest.cs =================================================================== diff -u -rec9f45c99b375218d00a89df1ac1e187ebf54070 -r03a263822252a5020135a7de96ea8e50d5eb5cc6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/BackgroundMapDataEntityReadExtensionsTest.cs (.../BackgroundMapDataEntityReadExtensionsTest.cs) (revision ec9f45c99b375218d00a89df1ac1e187ebf54070) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/BackgroundMapDataEntityReadExtensionsTest.cs (.../BackgroundMapDataEntityReadExtensionsTest.cs) (revision 03a263822252a5020135a7de96ea8e50d5eb5cc6) @@ -75,6 +75,35 @@ Assert.AreEqual(isVisible, mapData.IsVisible); Assert.AreEqual(transparancy, mapData.Transparency.Value); Assert.AreEqual(preferredFormat, mapData.PreferredFormat); + Assert.IsTrue(mapData.IsConfigured); } + + [Test] + public void Read_ConfigurableColumnsNull_ReturnUnConfiguredMapData() + { + // Setup + const string name = "map data"; + const bool isVisible = false; + const double transparancy = 0.4; + + var entity = new BackgroundMapDataEntity + { + Name = name, + IsVisible = Convert.ToByte(isVisible), + Transparency = transparancy + }; + + // Call + WmtsMapData mapData = entity.Read(); + + // Assert + Assert.AreEqual(name, mapData.Name); + Assert.IsNull(mapData.SourceCapabilitiesUrl); + Assert.IsNull(mapData.SelectedCapabilityIdentifier); + Assert.AreEqual(isVisible, mapData.IsVisible); + Assert.AreEqual(transparancy, mapData.Transparency.Value); + Assert.IsNull(mapData.PreferredFormat); + Assert.IsFalse(mapData.IsConfigured); + } } } \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ProjectEntityReadExtensionsTest.cs =================================================================== diff -u -r545b105a213ed85564861b4bcf6d2d6425dbde50 -r03a263822252a5020135a7de96ea8e50d5eb5cc6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ProjectEntityReadExtensionsTest.cs (.../ProjectEntityReadExtensionsTest.cs) (revision 545b105a213ed85564861b4bcf6d2d6425dbde50) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ProjectEntityReadExtensionsTest.cs (.../ProjectEntityReadExtensionsTest.cs) (revision 03a263822252a5020135a7de96ea8e50d5eb5cc6) @@ -78,14 +78,32 @@ Norm = norm, Name = "A", Order = 56, - Composition = Convert.ToByte(AssessmentSectionComposition.Dike) + Composition = Convert.ToByte(AssessmentSectionComposition.Dike), + BackgroundMapDataEntities = new[] + { + new BackgroundMapDataEntity + { + Name = "Background A", + Transparency = 0.0, + IsVisible = 1 + } + } }, new AssessmentSectionEntity { Norm = norm, Name = "B", Order = 0, - Composition = Convert.ToByte(AssessmentSectionComposition.Dike) + Composition = Convert.ToByte(AssessmentSectionComposition.Dike), + BackgroundMapDataEntities = new[] + { + new BackgroundMapDataEntity + { + Name = "Background B", + Transparency = 0.0, + IsVisible = 1 + } + } } } };