Index: src/Deltares.DSoilModel.Forms.Tests/DSoilModelPluginTests.cs
===================================================================
diff -u
--- src/Deltares.DSoilModel.Forms.Tests/DSoilModelPluginTests.cs (revision 0)
+++ src/Deltares.DSoilModel.Forms.Tests/DSoilModelPluginTests.cs (revision 392)
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Windows.Forms;
+using Deltares.DSoilModel.Data;
+using Deltares.Geometry.Forms;
+using Deltares.Geotechnics.Forms;
+using Deltares.Standard;
+using Deltares.Standard.EventPublisher;
+using Deltares.Standard.Forms;
+using Deltares.Standard.Forms.DExpress;
+using Deltares.Standard.Language;
+using Deltares.Standard.Units;
+using NUnit.Framework;
+
+namespace Deltares.DSoilModel.Forms.Tests
+{
+ [TestFixture]
+ [RequiresSTA]
+ class DSoilModelPluginTests
+ {
+ private MainForm mainForm;
+ private DSoilModelPlugin plugin;
+
+ [TestFixtureSetUp]
+ public void SetUp()
+ {
+ BindSupport.ClearCaches();
+
+ // to avoid Deltares.Standard.About class error
+ About.IgnoreAssemblyErrors = true;
+
+ mainForm = new MainForm();
+ mainForm.Register(new GeometryPlugin());
+ mainForm.Register(new GeotechnicsPlugin());
+ plugin = new DSoilModelPlugin();
+ mainForm.Register(plugin);
+ mainForm.Visible = true;
+ mainForm.CreateControl();
+ }
+
+ [TestFixtureTearDown]
+ public void TearDown()
+ {
+ // Don't call form.Close() because it will raise SaveAs dialog
+ //System.Windows.Forms.Application.Exit();
+ plugin.Dispose();
+ mainForm = null;
+ plugin = null;
+
+ BindSupport.ClearCaches();
+ About.IgnoreAssemblyErrors = false;
+ }
+
+ [Test]
+ public void HandleIsCreated()
+ {
+ Assert.IsTrue(mainForm.IsHandleCreated);
+ }
+
+ [Test]
+ public void TestSettingNewProject()
+ {
+ Assert.IsNotNull(NewProject(plugin));
+ }
+
+ [Test]
+ public void DMacPluginTestExecuteValidate()
+ {
+ NewProject(plugin);
+ var results = RealTimeBackgroundValidator.ValidationResults;
+ Assert.IsNotNull(results);
+ // empty project produces 0 errors if validated
+ Assert.AreEqual(0, results.ToList().Count);
+ }
+
+
+ private DSoilModelProject NewProject(DSoilModelPlugin p)
+ {
+ p.Project = new DSoilModelProject();
+ return p.Project;
+ }
+
+ }
+}
Index: src/Deltares.DSoilModel.Forms.Tests/Deltares.DSoilModel.Forms.Tests.csproj
===================================================================
diff -u -r388 -r392
--- src/Deltares.DSoilModel.Forms.Tests/Deltares.DSoilModel.Forms.Tests.csproj (.../Deltares.DSoilModel.Forms.Tests.csproj) (revision 388)
+++ src/Deltares.DSoilModel.Forms.Tests/Deltares.DSoilModel.Forms.Tests.csproj (.../Deltares.DSoilModel.Forms.Tests.csproj) (revision 392)
@@ -32,10 +32,18 @@
False
..\..\lib\Deltares\DslGeo\Deltares.Geometry.dll
+
+ False
+ ..\..\lib\Deltares\DslFormsGeo\Deltares.Geometry.Forms.dll
+
False
..\..\lib\Deltares\DslGeo\Deltares.Geotechnics.dll
+
+ False
+ ..\..\lib\Deltares\DslFormsGeo\Deltares.Geotechnics.Forms.dll
+
False
..\..\lib\Deltares\DslGeoIo\Deltares.Geotechnics.IO.dll
@@ -107,6 +115,7 @@
+