Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsScenariosContextTreeNodeInfoTest.cs =================================================================== diff -u -r5a67fdd92b4e69e1fde669dd27605d0eeaad734b -r3bcc8993307e3b6dea8f496d6acbc9c474581787 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsScenariosContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsScenariosContextTreeNodeInfoTest.cs) (revision 5a67fdd92b4e69e1fde669dd27605d0eeaad734b) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsScenariosContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsScenariosContextTreeNodeInfoTest.cs) (revision 3bcc8993307e3b6dea8f496d6acbc9c474581787) @@ -81,68 +81,42 @@ [Test] public void Text_Always_ReturnScenarios() { - // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - - var group = new CalculationGroup(); - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var context = new MacroStabilityInwardsScenariosContext(group, failureMechanism, assessmentSection); - // Call - string text = info.Text(context); + string text = info.Text(null); // Assert Assert.AreEqual("Scenario's", text); - mocks.VerifyAll(); } [Test] public void Image_Always_ReturnExpectedImage() { - // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - - var group = new CalculationGroup(); - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var context = new MacroStabilityInwardsScenariosContext(group, failureMechanism, assessmentSection); - // Call - Image image = info.Image(context); + Image image = info.Image(null); // Assert TestHelper.AssertImagesAreEqual(Resources.ScenariosIcon, image); - mocks.VerifyAll(); } [Test] public void ContextMenuStrip_Always_CallsBuilder() { // Setup var mocks = new MockRepository(); - - var assessmentSection = mocks.Stub(); var menuBuilder = mocks.StrictMock(); menuBuilder.Expect(mb => mb.AddOpenItem()).Return(menuBuilder); menuBuilder.Expect(mb => mb.Build()).Return(null); - var group = new CalculationGroup(); - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var context = new MacroStabilityInwardsScenariosContext(group, failureMechanism, assessmentSection); - using (var treeViewControl = new TreeViewControl()) { var gui = mocks.Stub(); - gui.Stub(g => g.Get(context, treeViewControl)).Return(menuBuilder); + gui.Stub(g => g.Get(null, treeViewControl)).Return(menuBuilder); mocks.ReplayAll(); plugin.Gui = gui; // Call - info.ContextMenuStrip(context, null, treeViewControl); + info.ContextMenuStrip(null, null, treeViewControl); // Assert mocks.VerifyAll();