Added unit test for setup dialog.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user