Added unit test for setup dialog.
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
|
|||||||
@@ -48,5 +48,16 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
{
|
{
|
||||||
Assert.That(_telescope.Connected, Is.False);
|
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()
|
public Telescope()
|
||||||
{
|
{
|
||||||
//todo move this out to IOC
|
//todo move this out to IOC
|
||||||
_utilities = new Util(); //Initialise util object
|
var util = new Util(); //Initialise util object
|
||||||
_utilitiesExtra = new Util(); //Initialise util object
|
_utilities = util;
|
||||||
|
_utilitiesExtra = util; //Initialise util object
|
||||||
_astroUtilities = new AstroUtils(); // Initialise astro utilities object
|
_astroUtilities = new AstroUtils(); // Initialise astro utilities object
|
||||||
_sharedResourcesWrapper = new SharedResourcesWrapper();
|
_sharedResourcesWrapper = new SharedResourcesWrapper();
|
||||||
_astroMaths = new AstroMaths();
|
_astroMaths = new AstroMaths();
|
||||||
|
|||||||
Reference in New Issue
Block a user