diff --git a/Meade.net.Telescope.UnitTests/Meade.net.Telescope.UnitTests.csproj b/Meade.net.Telescope.UnitTests/Meade.net.Telescope.UnitTests.csproj
index 89b3231..23613aa 100644
--- a/Meade.net.Telescope.UnitTests/Meade.net.Telescope.UnitTests.csproj
+++ b/Meade.net.Telescope.UnitTests/Meade.net.Telescope.UnitTests.csproj
@@ -26,6 +26,7 @@
prompt
4
false
+ x86
pdbonly
diff --git a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs
index 55c3af3..a427f0c 100644
--- a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs
+++ b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs
@@ -48,5 +48,16 @@ namespace Meade.net.Telescope.UnitTests
{
Assert.That(_telescope.Connected, Is.False);
}
+
+ [Test]
+ public void SetupDialog()
+ {
+ _sharedResourcesWrapperMock.Verify(x => x.ReadProfile(), Times.Once);
+
+ _telescope.SetupDialog();
+
+ _sharedResourcesWrapperMock.Verify( x => x.SetupDialog(), Times.Once);
+ _sharedResourcesWrapperMock.Verify(x => x.ReadProfile(), Times.Exactly(2));
+ }
}
}
diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs
index 061bf0f..b0987af 100644
--- a/Meade.net.Telescope/Telescope.cs
+++ b/Meade.net.Telescope/Telescope.cs
@@ -75,8 +75,9 @@ namespace ASCOM.Meade.net
public Telescope()
{
//todo move this out to IOC
- _utilities = new Util(); //Initialise util object
- _utilitiesExtra = new Util(); //Initialise util object
+ var util = new Util(); //Initialise util object
+ _utilities = util;
+ _utilitiesExtra = util; //Initialise util object
_astroUtilities = new AstroUtils(); // Initialise astro utilities object
_sharedResourcesWrapper = new SharedResourcesWrapper();
_astroMaths = new AstroMaths();