Index: src/Deltares.DSoilModel.Forms.Tests/CenterCrestLocationPropertyControlTest.cs =================================================================== diff -u -r326 -r333 --- src/Deltares.DSoilModel.Forms.Tests/CenterCrestLocationPropertyControlTest.cs (.../CenterCrestLocationPropertyControlTest.cs) (revision 326) +++ src/Deltares.DSoilModel.Forms.Tests/CenterCrestLocationPropertyControlTest.cs (.../CenterCrestLocationPropertyControlTest.cs) (revision 333) @@ -1,61 +1,49 @@ using Deltares.DSoilModel.Data; using Deltares.Geotechnics; +using Deltares.Standard.Forms; using NUnit.Framework; namespace Deltares.DSoilModel.Forms.Tests { [TestFixture, RequiresSTA] public class CenterCrestLocationPropertyControlTest : ControlTester { - private CenterCrestLocationPropertyControl control; - - [SetUp] - public void Setup() + protected override IPropertyControl CreatePropertyControl() { - control = new CenterCrestLocationPropertyControl(); + return new CenterCrestLocationPropertyControl(); } - [TearDown] - public void TearDown() - { - control.Dispose(); - control = null; - } - [Test] public void TestControlBindings() { - using (var control = new CenterCrestLocationPropertyControl()) + var profile = new SoilProfile2D(); + var location = new CenterCrestLocation { - var profile = new SoilProfile2D(); - var location = new CenterCrestLocation - { - Location = 1.23, - SoilProfile2D = profile - }; - control.SelectedObject = location; + Location = 1.23, + SoilProfile2D = profile + }; + PropertyControl.SelectedObject = location; - Assert.AreSame(location, control.SelectedObject); + Assert.AreSame(location, PropertyControl.SelectedObject); - Assert.IsTrue(control.IsVisible); + Assert.IsTrue(PropertyControl.IsVisible); - TestSpinEditVisibleEnabledValue(control, "XcoordinateEdit", true, true, location, x => x.Location, 2.34); - TestLabelControlVisibleValue(control, "XcoordinateLabel", true, "Locatie"); - } + TestSpinEditVisibleEnabledValue(PropertyControl, "XcoordinateEdit", true, true, location, x => x.Location, 2.34); + TestLabelControlVisibleValue(PropertyControl, "XcoordinateLabel", true, "Locatie"); } [Test] public void TestSelectedObject() { var location = new CenterCrestLocation(); - control.SelectedObject = location; - Assert.AreSame(location, control.SelectedObject); + PropertyControl.SelectedObject = location; + Assert.AreSame(location, PropertyControl.SelectedObject); } [Test] public void TestIsVisible() { - Assert.IsTrue(control.IsVisible); + Assert.IsTrue(PropertyControl.IsVisible); } }