Index: src/Deltares.DSoilModel.Forms.Tests/BoringLookup2DControlTest.cs =================================================================== diff -u -r324 -r331 --- src/Deltares.DSoilModel.Forms.Tests/BoringLookup2DControlTest.cs (.../BoringLookup2DControlTest.cs) (revision 324) +++ src/Deltares.DSoilModel.Forms.Tests/BoringLookup2DControlTest.cs (.../BoringLookup2DControlTest.cs) (revision 331) @@ -1,26 +1,17 @@ using Deltares.Geotechnics; +using Deltares.Standard.Forms; using NUnit.Framework; namespace Deltares.DSoilModel.Forms.Tests { [TestFixture, RequiresSTA] public class BoringLookup2DControlTest : ControlTester { - private BoringLookup2DControl control; - - [SetUp] - public void Setup() + protected override IPropertyControl CreatePropertyControl() { - control = new BoringLookup2DControl(); + return new BoringLookup2DControl(); } - [TearDown] - public void TearDown() - { - control.Dispose(); - control = null; - } - [Test] public void TestControlBindings() { @@ -31,32 +22,32 @@ Zlocal = 0, SoilProfile2D = profile }; - control.SelectedObject = lookup; + PropertyControl.SelectedObject = lookup; - Assert.AreSame(lookup, control.SelectedObject); + Assert.AreSame(lookup, PropertyControl.SelectedObject); - Assert.IsTrue(control.IsVisible); + Assert.IsTrue(PropertyControl.IsVisible); - TestSpinEditVisibleEnabledValue(control, "XEdit", true, true, lookup, x => x.Xlocal, 1.0); - TestLabelControlVisibleValue(control, "XLabel", true, "Lokale x [-]"); // unit should be [m], see issue MDNLIB-796 + TestSpinEditVisibleEnabledValue(PropertyControl, "XEdit", true, true, lookup, x => x.Xlocal, 1.0); + TestLabelControlVisibleValue(PropertyControl, "XLabel", true, "Lokale x [-]"); // unit should be [m], see issue MDNLIB-796 } [Test] public void TestSelectedObject() { var lookup = new BoringLookup2D { Boring = new Boring( )}; - control.SelectedObject = lookup; - Assert.AreSame(lookup, control.SelectedObject); + PropertyControl.SelectedObject = lookup; + Assert.AreSame(lookup, PropertyControl.SelectedObject); - var subcontrol = GetPrivateField(control, "BoringControl") as BoringControl; + var subcontrol = GetPrivateField(PropertyControl, "BoringControl") as BoringControl; Assert.NotNull(subcontrol); Assert.AreSame(lookup.Boring, subcontrol.SelectedObject); } [Test] public void TestIsVisible() { - Assert.IsTrue(control.IsVisible); + Assert.IsTrue(PropertyControl.IsVisible); } } }