Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructureContext.cs
===================================================================
diff -u -rf994b1077b45f107c38c87b94ddeb5e91e1f95fe -r0153023b4f33722b801edf55eba942048c261779
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructureContext.cs (.../ClosingStructureContext.cs) (revision f994b1077b45f107c38c87b94ddeb5e91e1f95fe)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructureContext.cs (.../ClosingStructureContext.cs) (revision 0153023b4f33722b801edf55eba942048c261779)
@@ -28,18 +28,18 @@
namespace Ringtoets.ClosingStructures.Forms.PresentationObjects
{
///
- /// The presentation object for
+ /// The presentation object for .
///
public class ClosingStructureContext : ObservableWrappedObjectContextBase>
{
///
- /// Creates an instance of
+ /// Creates an instance of .
///
- /// The wrapped containing
- /// The assessment section which the closing structures belong to
- /// Thrown when any of the input arguments are null
- public ClosingStructureContext(ObservableList closingStructures, IAssessmentSection assessmentSection)
- : base(closingStructures)
+ /// The wrapped containing .
+ /// The assessment section which the closing structures belong to.
+ /// Thrown when any of the input arguments are null.
+ public ClosingStructureContext(ObservableList closingStructures, IAssessmentSection assessmentSection)
+ : base(closingStructures)
{
if (assessmentSection == null)
{
@@ -50,8 +50,8 @@
}
///
- /// Gets the assessment section of this instance
+ /// Gets the assessment section of this instance.
///
public IAssessmentSection AssessmentSection { get; private set; }
}
-}
+}
\ No newline at end of file
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationGroupContext.cs
===================================================================
diff -u -re8162b5b22781fbe2258f99aa208e38f3ead9133 -r0153023b4f33722b801edf55eba942048c261779
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationGroupContext.cs (.../ClosingStructuresCalculationGroupContext.cs) (revision e8162b5b22781fbe2258f99aa208e38f3ead9133)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationGroupContext.cs (.../ClosingStructuresCalculationGroupContext.cs) (revision 0153023b4f33722b801edf55eba942048c261779)
@@ -34,12 +34,12 @@
public class ClosingStructuresCalculationGroupContext : ClosingStructuresContext, ICalculationContext
{
///
- /// Creates a new instance of
+ /// Creates a new instance of .
///
- /// The instance that is wrapped by this context object
- /// The failure mechanism of the instance
- /// The assessment section of the instance
- /// Thrown when any of the input parameters are null
+ /// The instance that is wrapped by this context object.
+ /// The failure mechanism of the instance.
+ /// The assessment section of the instance.
+ /// Thrown when any of the input parameters are null.
public ClosingStructuresCalculationGroupContext(CalculationGroup calculationGroup, ClosingStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) :
base(calculationGroup, failureMechanism, assessmentSection) {}
}
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresContext.cs
===================================================================
diff -u -re8162b5b22781fbe2258f99aa208e38f3ead9133 -r0153023b4f33722b801edf55eba942048c261779
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresContext.cs (.../ClosingStructuresContext.cs) (revision e8162b5b22781fbe2258f99aa208e38f3ead9133)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresContext.cs (.../ClosingStructuresContext.cs) (revision 0153023b4f33722b801edf55eba942048c261779)
@@ -23,8 +23,8 @@
using Core.Common.Base;
using Core.Common.Controls.PresentationObjects;
using Ringtoets.ClosingStructures.Data;
-using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.ClosingStructures.Forms.Properties;
+using Ringtoets.Common.Data.AssessmentSection;
using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
namespace Ringtoets.ClosingStructures.Forms.PresentationObjects
@@ -33,18 +33,18 @@
/// Presentation object representing all required closing structures input knowledge to configure and create
/// related objects. It will delegate observable behaviour to the wrapped data object.
///
- public abstract class ClosingStructuresContext : ObservableWrappedObjectContextBase where T:IObservable
+ public abstract class ClosingStructuresContext : ObservableWrappedObjectContextBase where T : IObservable
{
///
- /// Initializes a new instance of
+ /// Initializes a new instance of .
///
- /// The concrete data instance wrapped by the context object
- /// The failure mechanism which the context belongs to
- /// The assessment section which the context belongs to
- /// Thrown when any of the input parameters are null
+ /// The concrete data instance wrapped by the context object.
+ /// The failure mechanism which the context belongs to.
+ /// The assessment section which the context belongs to.
+ /// Thrown when any of the input parameters are null.
protected ClosingStructuresContext(T wrappedData,
- ClosingStructuresFailureMechanism failureMechanism,
- IAssessmentSection assessmentSection)
+ ClosingStructuresFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
: base(wrappedData)
{
if (failureMechanism == null)
@@ -57,7 +57,7 @@
if (assessmentSection == null)
{
string message = string.Format(RingtoetsCommonFormsResources.AssertInputsAreNotNull_DataDescription_0_cannot_be_null,
- RingtoetsCommonFormsResources.FailureMechanismContext_DataDescription_AssessmentSection);
+ RingtoetsCommonFormsResources.FailureMechanismContext_DataDescription_AssessmentSection);
throw new ArgumentNullException("assessmentSection", message);
}
@@ -67,13 +67,13 @@
}
///
- /// Gets the assessment section for this instance
+ /// Gets the assessment section for this instance.
///
public IAssessmentSection AssessmentSection { get; private set; }
///
- /// Gets the failure mechanism for this instance
+ /// Gets the failure mechanism for this instance.
///
public ClosingStructuresFailureMechanism FailureMechanism { get; private set; }
}
-}
+}
\ No newline at end of file
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj
===================================================================
diff -u -re8162b5b22781fbe2258f99aa208e38f3ead9133 -r0153023b4f33722b801edf55eba942048c261779
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj (.../Ringtoets.ClosingStructures.Forms.csproj) (revision e8162b5b22781fbe2258f99aa208e38f3ead9133)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj (.../Ringtoets.ClosingStructures.Forms.csproj) (revision 0153023b4f33722b801edf55eba942048c261779)
@@ -89,6 +89,7 @@
{70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2}
Ringtoets.HydraRing.Data
+ False
{C6309704-D67B-434C-BC98-9F8910BC1D10}
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresContextTest.cs
===================================================================
diff -u -re8162b5b22781fbe2258f99aa208e38f3ead9133 -r0153023b4f33722b801edf55eba942048c261779
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresContextTest.cs (.../ClosingStructuresContextTest.cs) (revision e8162b5b22781fbe2258f99aa208e38f3ead9133)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresContextTest.cs (.../ClosingStructuresContextTest.cs) (revision 0153023b4f33722b801edf55eba942048c261779)
@@ -40,16 +40,16 @@
// Setup
var mockRepository = new MockRepository();
var assessmentSectionMock = mockRepository.StrictMock();
+ var target = mockRepository.Stub();
mockRepository.ReplayAll();
- var target = new ObservableObject();
var failureMechanism = new ClosingStructuresFailureMechanism();
// Call
- var context = new SimpleClosingStructuresContext(target, failureMechanism, assessmentSectionMock);
+ var context = new SimpleClosingStructuresContext(target, failureMechanism, assessmentSectionMock);
// Assert
- Assert.IsInstanceOf>(context);
+ Assert.IsInstanceOf>(context);
Assert.AreSame(target, context.WrappedData);
Assert.AreSame(assessmentSectionMock, context.AssessmentSection);
Assert.AreSame(failureMechanism, context.FailureMechanism);
@@ -61,13 +61,12 @@
{
// Setup
var mockRepository = new MockRepository();
- var assessmentSectionMock = mockRepository.StrictMock();
+ var assessmentSectionMock = mockRepository.Stub();
+ var observableObject = mockRepository.Stub();
mockRepository.ReplayAll();
- var observableObject = new ObservableObject();
-
// Call
- TestDelegate call = () => new SimpleClosingStructuresContext(observableObject, null, assessmentSectionMock);
+ TestDelegate call = () => new SimpleClosingStructuresContext(observableObject, null, assessmentSectionMock);
// Assert
const string expectedMessage = "Het sluitings kunstwerk toetsspoor mag niet 'null' zijn.";
@@ -79,19 +78,20 @@
public void ParameteredConstructor_AssessmentSectionIsNull_ThrowsArgumentNullException()
{
// Setup
- var observableObject = new ObservableObject();
+ var mockRepository = new MockRepository();
+ var observableObject = mockRepository.Stub();
+ mockRepository.ReplayAll();
+
var failureMechanism = new ClosingStructuresFailureMechanism();
// Call
- TestDelegate call = () => new SimpleClosingStructuresContext(observableObject, failureMechanism, null);
+ TestDelegate call = () => new SimpleClosingStructuresContext(observableObject, failureMechanism, null);
// Assert
const string expectedMessage = "Het traject mag niet 'null' zijn.";
TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage);
}
- private class ObservableObject : Observable { }
-
private class SimpleClosingStructuresContext : ClosingStructuresContext where T : IObservable
{
public SimpleClosingStructuresContext(T target, ClosingStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection)
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs
===================================================================
diff -u -re8162b5b22781fbe2258f99aa208e38f3ead9133 -r0153023b4f33722b801edf55eba942048c261779
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision e8162b5b22781fbe2258f99aa208e38f3ead9133)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 0153023b4f33722b801edf55eba942048c261779)
@@ -46,7 +46,7 @@
public void SetUp()
{
mocks = new MockRepository();
- guiMock = mocks.StrictMock();
+ guiMock = mocks.Stub();
plugin = new ClosingStructuresPlugin()
{
Gui = guiMock
@@ -55,6 +55,13 @@
info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ClosingStructuresCalculationGroupContext));
}
+ [TearDown]
+ public void TearDown()
+ {
+ plugin.Dispose();
+ mocks.VerifyAll();
+ }
+
[Test]
public void ContextMenuStrip_WithoutParentNodeDefaultBehavior_CallsContextMenuBuilderMethods()
{
@@ -63,8 +70,8 @@
var failureMechanism = new ClosingStructuresFailureMechanism();
var assessmentSectionMock = mocks.StrictMock();
var groupContext = new ClosingStructuresCalculationGroupContext(group,
- failureMechanism,
- assessmentSectionMock);
+ failureMechanism,
+ assessmentSectionMock);
var menuBuilderMock = mocks.StrictMock();
/* Part of WTI-550
@@ -75,9 +82,9 @@
menuBuilderMock.Expect(mb => mb.AddSeparator()).Return(menuBuilderMock);
menuBuilderMock.Expect(mb => mb.AddCustomItem(null)).IgnoreArguments().Return(menuBuilderMock);
menuBuilderMock.Expect(mb => mb.AddCustomItem(null)).IgnoreArguments().Return(menuBuilderMock);
- menuBuilderMock.Expect(mb => mb.AddCustomItem(null)).IgnoreArguments().Return(menuBuilderMock);
- * */
+ menuBuilderMock.Expect(mb => mb.AddCustomItem(null)).IgnoreArguments().Return(menuBuilderMock
menuBuilderMock.Expect(mb => mb.AddSeparator()).Return(menuBuilderMock);
+ **/
menuBuilderMock.Expect(mb => mb.AddExpandAllItem()).Return(menuBuilderMock);
menuBuilderMock.Expect(mb => mb.AddCollapseAllItem()).Return(menuBuilderMock);
menuBuilderMock.Expect(mb => mb.AddSeparator()).Return(menuBuilderMock);
@@ -98,4 +105,4 @@
// Assert expectancies called in TearDown()
}
}
-}
+}
\ No newline at end of file