Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuBuilderTest.cs =================================================================== diff -u -r5bf6a765222c80d0d2b52cad46f0699dede3f2c2 -rada94ef2b6943fb9a2d8e59256871205a7d4c4ee --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuBuilderTest.cs (.../RingtoetsContextMenuBuilderTest.cs) (revision 5bf6a765222c80d0d2b52cad46f0699dede3f2c2) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuBuilderTest.cs (.../RingtoetsContextMenuBuilderTest.cs) (revision ada94ef2b6943fb9a2d8e59256871205a7d4c4ee) @@ -1630,7 +1630,10 @@ #region AddUpdateForeshoreProfileOfCalculationItem [Test] - public void AddUpdateForeshoreProfileOfCalculationItem_CalculationWithForeshoreProfile_ItemAddedToContextMenuEnabled() + [TestCase(true)] + [TestCase(false)] + public void AddUpdateForeshoreProfileOfCalculationItem_CalculationWithForeshoreProfile_ItemAddedToContextMenuEnabledIfNotSynchronized( + bool synchronized) { // Setup var mocks = new MockRepository(); @@ -1641,7 +1644,10 @@ var viewCommandsMock = mocks.StrictMock(); var calculationMock = mocks.StrictMock>(); - calculationMock.Expect(c => c.InputParameters.ForeshoreProfile).Return(new TestForeshoreProfile()); + var input = mocks.StrictMock(); + input.Expect(i => i.ForeshoreProfile).Return(new TestForeshoreProfile()); + input.Expect(i => i.IsForeshoreProfileParametersSynchronized).Return(synchronized); + calculationMock.Expect(c => c.InputParameters).Return(input); var inquiryHelperMock = mocks.StrictMock(); mocks.ReplayAll(); @@ -1668,8 +1674,11 @@ Assert.AreEqual(1, result.Items.Count); TestHelper.AssertContextMenuStripContainsItem(result, 0, "&Bijwerken voorlandprofiel...", - "Berekening bijwerken waar een voorlandprofiel geselecteerd is.", - RingtoetsFormsResources.UpdateItemIcon); + synchronized + ? "Geselecteerd voorlandprofiel heeft geen wijzingingen om bij te werken." + : "Berekening bijwerken waar een voorlandprofiel geselecteerd is.", + RingtoetsFormsResources.UpdateItemIcon, + !synchronized); } mocks.VerifyAll(); @@ -1714,7 +1723,7 @@ Assert.AreEqual(1, result.Items.Count); TestHelper.AssertContextMenuStripContainsItem(result, 0, "&Bijwerken voorlandprofiel...", - "Er moet een voorlandprofiel geselecteerd zijn.", + "Geselecteerd voorlandprofiel heeft geen wijzingingen om bij te werken.", RingtoetsFormsResources.UpdateItemIcon, false); }