Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ClosingStructuresPluginTest.cs =================================================================== diff -u -r5efc7525e9ab2125a64b2e9b207b064c643f6514 -r0764f95727a4586e2b566d1e66c989a6327f3e2b --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ClosingStructuresPluginTest.cs (.../ClosingStructuresPluginTest.cs) (revision 5efc7525e9ab2125a64b2e9b207b064c643f6514) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ClosingStructuresPluginTest.cs (.../ClosingStructuresPluginTest.cs) (revision 0764f95727a4586e2b566d1e66c989a6327f3e2b) @@ -26,10 +26,12 @@ using Core.Common.Gui.TestUtil; using Core.Common.TestUtil; using NUnit.Framework; +using Rhino.Mocks; using Ringtoets.ClosingStructures.Data; using Ringtoets.ClosingStructures.Forms.PresentationObjects; using Ringtoets.ClosingStructures.Forms.PropertyClasses; using Ringtoets.ClosingStructures.Forms.Views; +using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Forms.PresentationObjects; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -53,21 +55,36 @@ public void GetPropertyInfos_ReturnsSupportedPropertyClassesWithExpectedValues() { // setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + using (var plugin = new ClosingStructuresPlugin()) { // call PropertyInfo[] propertyInfos = plugin.GetPropertyInfos().ToArray(); // assert - Assert.AreEqual(1, propertyInfos.Length); + Assert.AreEqual(2, propertyInfos.Length); PropertyInfo closingStructureProperties = PluginTestHelper.AssertPropertyInfoDefined( propertyInfos, typeof(ClosingStructure), typeof(ClosingStructureProperties)); Assert.IsNull(closingStructureProperties.AdditionalDataCheck); Assert.IsNull(closingStructureProperties.GetObjectPropertiesData); Assert.IsNull(closingStructureProperties.AfterCreate); + + var failureMechanism = new ClosingStructuresFailureMechanism(); + var failureMechanismContext = new ClosingStructuresFailureMechanismContext(failureMechanism, assessmentSection); + PropertyInfo closingStructureFailureMechanismProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(ClosingStructuresFailureMechanismContext), + typeof(ClosingStructureFailureMechanismProperties)); + Assert.AreSame(failureMechanism, closingStructureFailureMechanismProperties.GetObjectPropertiesData(failureMechanismContext)); + Assert.IsNull(closingStructureFailureMechanismProperties.AdditionalDataCheck); + Assert.IsNull(closingStructureFailureMechanismProperties.AfterCreate); } + mocks.VerifyAll(); } [Test]