Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -r944d2501b3f780d208e00015a1b850afad4c3aa8 -reec9f1ac3701c6155c49101fcc9649d51ffdc319 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismCreateExtensionsTest.cs (.../WaveImpactAsphaltCoverFailureMechanismCreateExtensionsTest.cs) (revision 944d2501b3f780d208e00015a1b850afad4c3aa8) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismCreateExtensionsTest.cs (.../WaveImpactAsphaltCoverFailureMechanismCreateExtensionsTest.cs) (revision eec9f1ac3701c6155c49101fcc9649d51ffdc319) @@ -26,6 +26,7 @@ using Application.Ringtoets.Storage.DbContext; using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; +using Ringtoets.StabilityStoneCover.Data; using Ringtoets.WaveImpactAsphaltCover.Data; namespace Application.Ringtoets.Storage.Test.Create.WaveImpactAsphaltCover @@ -117,5 +118,31 @@ Assert.AreEqual(1, entity.FailureMechanismSectionEntities.Count); Assert.AreEqual(1, entity.FailureMechanismSectionEntities.SelectMany(fms => fms.WaveImpactAsphaltCoverSectionResultEntities).Count()); } + [Test] + public void Create_WithoutForeshoreProfiles_EmptyForeshoreProfilesEntities() + { + // Setup + var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); + + // Call + var entity = failureMechanism.Create(new PersistenceRegistry()); + + // Assert + Assert.IsEmpty(entity.ForeshoreProfileEntities); + } + + [Test] + public void Create_WithForeshoreProfiles_ForeshoreProfilesEntitiesCreated() + { + // Setup + var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); + failureMechanism.ForeshoreProfiles.Add(new TestForeshoreProfile()); + + // Call + var entity = failureMechanism.Create(new PersistenceRegistry()); + + // Assert + Assert.AreEqual(1, entity.ForeshoreProfileEntities.Count); + } } } \ No newline at end of file