Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -rb29b8e0f6b5fd13f63c2b854667e28e6a9cbcb50 -r93494e03be387a9ee0f6fed5e7e801529c78dc98 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision b29b8e0f6b5fd13f63c2b854667e28e6a9cbcb50) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 93494e03be387a9ee0f6fed5e7e801529c78dc98) @@ -137,6 +137,24 @@ } /// + /// Looks up a localized string similar to Selecteer het type traject, bepalend voor de faalkansbegroting.. + /// + public static string AssessmentSectionComposition_Composition_Description { + get { + return ResourceManager.GetString("AssessmentSectionComposition_Composition_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Trajecttype. + /// + public static string AssessmentSectionComposition_Composition_DisplayName { + get { + return ResourceManager.GetString("AssessmentSectionComposition_Composition_DisplayName", resourceCulture); + } + } + + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// public static System.Drawing.Bitmap AssessmentSectionFolder { @@ -424,24 +442,6 @@ } /// - /// Looks up a localized string similar to Selecteer het type traject, bepalend voor de faalkansbegroting.. - /// - public static string FailureMechanismContribution_Composition_Description { - get { - return ResourceManager.GetString("FailureMechanismContribution_Composition_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Trajecttype. - /// - public static string FailureMechanismContribution_Composition_DisplayName { - get { - return ResourceManager.GetString("FailureMechanismContribution_Composition_DisplayName", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Trajecttype: {0}. /// public static string FailureMechanismContributionView_AssessmentSectionCompositionLabelText_AssessmentSectionComposition_0_ { Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.resx =================================================================== diff -u -rb29b8e0f6b5fd13f63c2b854667e28e6a9cbcb50 -r93494e03be387a9ee0f6fed5e7e801529c78dc98 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.resx (.../Resources.resx) (revision b29b8e0f6b5fd13f63c2b854667e28e6a9cbcb50) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.resx (.../Resources.resx) (revision 93494e03be387a9ee0f6fed5e7e801529c78dc98) @@ -267,10 +267,10 @@ Hs [m] - + Selecteer het type traject, bepalend voor de faalkansbegroting. - + Trajecttype Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/AssessmentSectionCompositionProperties.cs =================================================================== diff -u -rc602baeb36d745d3a356bd7832e132cb21cad711 -r93494e03be387a9ee0f6fed5e7e801529c78dc98 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/AssessmentSectionCompositionProperties.cs (.../AssessmentSectionCompositionProperties.cs) (revision c602baeb36d745d3a356bd7832e132cb21cad711) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/AssessmentSectionCompositionProperties.cs (.../AssessmentSectionCompositionProperties.cs) (revision 93494e03be387a9ee0f6fed5e7e801529c78dc98) @@ -47,9 +47,7 @@ /// The assessment section for which the properties are shown. /// The for when the composition changes. /// Thrown when any parameter is null. - public AssessmentSectionCompositionProperties( - IAssessmentSection assessmentSection, - IAssessmentSectionCompositionChangeHandler compositionChangeHandler) + public AssessmentSectionCompositionProperties(IAssessmentSection assessmentSection, IAssessmentSectionCompositionChangeHandler compositionChangeHandler) { if (assessmentSection == null) { @@ -69,9 +67,9 @@ [PropertyOrder(1)] [TypeConverter(typeof(EnumTypeConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] - [ResourcesDisplayName(typeof(Resources), nameof(Resources.FailureMechanismContribution_Composition_DisplayName))] - [ResourcesDescription(typeof(Resources), nameof(Resources.FailureMechanismContribution_Composition_Description))] - public AssessmentSectionComposition AssessmentSectionComposition + [ResourcesDisplayName(typeof(Resources), nameof(Resources.AssessmentSectionComposition_Composition_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.AssessmentSectionComposition_Composition_Description))] + public AssessmentSectionComposition Composition { get { Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/NormProperties.cs =================================================================== diff -u -r2d3979f45682cd0678d8210208c468bee4095619 -r93494e03be387a9ee0f6fed5e7e801529c78dc98 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/NormProperties.cs (.../NormProperties.cs) (revision 2d3979f45682cd0678d8210208c468bee4095619) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/NormProperties.cs (.../NormProperties.cs) (revision 93494e03be387a9ee0f6fed5e7e801529c78dc98) @@ -47,9 +47,7 @@ /// The for which the properties are shown. /// The for when the norm changes. /// Thrown when any parameter is null. - public NormProperties( - FailureMechanismContribution failureMechanismContribution, - IObservablePropertyChangeHandler normChangeHandler) + public NormProperties(FailureMechanismContribution failureMechanismContribution, IObservablePropertyChangeHandler normChangeHandler) { if (failureMechanismContribution == null) { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/AssessmentSectionCompositionPropertiesTest.cs =================================================================== diff -u -rc602baeb36d745d3a356bd7832e132cb21cad711 -r93494e03be387a9ee0f6fed5e7e801529c78dc98 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/AssessmentSectionCompositionPropertiesTest.cs (.../AssessmentSectionCompositionPropertiesTest.cs) (revision c602baeb36d745d3a356bd7832e132cb21cad711) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/AssessmentSectionCompositionPropertiesTest.cs (.../AssessmentSectionCompositionPropertiesTest.cs) (revision 93494e03be387a9ee0f6fed5e7e801529c78dc98) @@ -48,9 +48,7 @@ mocks.ReplayAll(); // Call - TestDelegate test = () => new AssessmentSectionCompositionProperties( - null, - assessmentSectionChangeHandler); + TestDelegate test = () => new AssessmentSectionCompositionProperties(null, assessmentSectionChangeHandler); // Assert string paramName = Assert.Throws(test).ParamName; @@ -67,9 +65,7 @@ mocks.ReplayAll(); // Call - TestDelegate test = () => new AssessmentSectionCompositionProperties( - assessmentSection, - null); + TestDelegate test = () => new AssessmentSectionCompositionProperties(assessmentSection, null); // Assert string paramName = Assert.Throws(test).ParamName; @@ -87,9 +83,7 @@ mocks.ReplayAll(); // Call - var properties = new AssessmentSectionCompositionProperties( - assessmentSection, - assessmentSectionChangeHandler); + var properties = new AssessmentSectionCompositionProperties(assessmentSection, assessmentSectionChangeHandler); // Assert Assert.IsInstanceOf>(properties); @@ -107,9 +101,7 @@ mocks.ReplayAll(); // Call - var properties = new AssessmentSectionCompositionProperties( - assessmentSection, - assessmentSectionChangeHandler); + var properties = new AssessmentSectionCompositionProperties(assessmentSection, assessmentSectionChangeHandler); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); @@ -131,24 +123,22 @@ { // Setup var mocks = new MockRepository(); - const AssessmentSectionComposition assessmentSectionComposition = AssessmentSectionComposition.DikeAndDune; + const AssessmentSectionComposition composition = AssessmentSectionComposition.DikeAndDune; var assessmentSection = mocks.Stub(); - assessmentSection.Stub(section => section.Composition).Return(assessmentSectionComposition); + assessmentSection.Stub(section => section.Composition).Return(composition); var assessmentSectionChangeHandler = mocks.Stub(); mocks.ReplayAll(); // Call - var properties = new AssessmentSectionCompositionProperties( - assessmentSection, - assessmentSectionChangeHandler); + var properties = new AssessmentSectionCompositionProperties(assessmentSection, assessmentSectionChangeHandler); // Assert - Assert.AreEqual(assessmentSectionComposition, properties.AssessmentSectionComposition); + Assert.AreEqual(composition, properties.Composition); mocks.VerifyAll(); } [Test] - public void GivenAssessmentSectionComposition_WhenConfirmingCompositionValueChange_ThenAssessmentSectionCompositionSetAndNotifiesObserver() + public void GivenAssessmentSectionCompositionProperties_WhenConfirmingCompositionValueChange_ThenCompositionSetAndNotifiesObserver() { // Given const AssessmentSectionComposition originalComposition = AssessmentSectionComposition.Dike; @@ -164,9 +154,7 @@ var compositionChangeHandler = new AssessmentSectionCompositionChangeHandler(viewCommands); - var properties = new AssessmentSectionCompositionProperties( - assessmentSection, - compositionChangeHandler); + var properties = new AssessmentSectionCompositionProperties(assessmentSection, compositionChangeHandler); DialogBoxHandler = (name, wnd) => { @@ -176,16 +164,16 @@ // When const AssessmentSectionComposition newComposition = AssessmentSectionComposition.DikeAndDune; - properties.AssessmentSectionComposition = newComposition; + properties.Composition = newComposition; // Then - Assert.AreEqual(newComposition, properties.AssessmentSectionComposition); + Assert.AreEqual(newComposition, properties.Composition); Assert.AreEqual(newComposition, assessmentSection.Composition); mocks.VerifyAll(); } [Test] - public void GivenAssessmentSectionComposition_WhenCancelingCompositionValueChange_ThenDataSameObserversNotNotified() + public void GivenAssessmentSectionCompositionProperties_WhenCancelingCompositionValueChange_ThenDataSameAndObserversNotNotified() { // Given const AssessmentSectionComposition originalComposition = AssessmentSectionComposition.Dike; @@ -201,9 +189,7 @@ var compositionChangeHandler = new AssessmentSectionCompositionChangeHandler(viewCommands); - var properties = new AssessmentSectionCompositionProperties( - assessmentSection, - compositionChangeHandler); + var properties = new AssessmentSectionCompositionProperties(assessmentSection, compositionChangeHandler); DialogBoxHandler = (name, wnd) => { @@ -213,10 +199,10 @@ // When const AssessmentSectionComposition newComposition = AssessmentSectionComposition.DikeAndDune; - properties.AssessmentSectionComposition = newComposition; + properties.Composition = newComposition; // Then - Assert.AreEqual(originalComposition, properties.AssessmentSectionComposition); + Assert.AreEqual(originalComposition, properties.Composition); Assert.AreEqual(originalComposition, assessmentSection.Composition); mocks.VerifyAll(); } @@ -228,7 +214,7 @@ [TestCase(AssessmentSectionComposition.Dune, AssessmentSectionComposition.DikeAndDune)] [TestCase(AssessmentSectionComposition.DikeAndDune, AssessmentSectionComposition.Dike)] [TestCase(AssessmentSectionComposition.DikeAndDune, AssessmentSectionComposition.Dune)] - public void AssessmentSectionComposition_CompositionValueChanges_NotifiesChangedObjectsInAssessmentSection( + public void Composition_ValueChanges_NotifiesChangedObjectsInAssessmentSection( AssessmentSectionComposition initialComposition, AssessmentSectionComposition newComposition) { // Setup @@ -251,12 +237,10 @@ }); mocks.ReplayAll(); - var properties = new AssessmentSectionCompositionProperties( - assessmentSection, - compositionChangeHandler); + var properties = new AssessmentSectionCompositionProperties(assessmentSection, compositionChangeHandler); // Call - properties.AssessmentSectionComposition = newComposition; + properties.Composition = newComposition; // Assert mocks.VerifyAll();