Added unit test for telescope hitting tripod.
This commit is contained in:
@@ -2291,6 +2291,21 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
Assert.That(exception.Message, Is.EqualTo("Above below elevation"));
|
Assert.That(exception.Message, Is.EqualTo("Above below elevation"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void SlewToTargetAsync_WhenTelescopeCanHitTripod_ThenThrowsException()
|
||||||
|
{
|
||||||
|
_sharedResourcesWrapperMock.Setup(x => x.SendChar("#:MS#")).Returns("3");
|
||||||
|
_sharedResourcesWrapperMock.Setup(x => x.ReadTerminated()).Returns("the telescope can hit the tripod");
|
||||||
|
|
||||||
|
ConnectTelescope();
|
||||||
|
|
||||||
|
_telescope.TargetRightAscension = 2;
|
||||||
|
_telescope.TargetDeclination = 1;
|
||||||
|
|
||||||
|
var exception = Assert.Throws<InvalidOperationException>(() => { _telescope.SlewToTargetAsync(); });
|
||||||
|
Assert.That(exception.Message, Is.EqualTo("the telescope can hit the tripod"));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void SlewToTarget_WhenNotConnected_ThenThrowsException()
|
public void SlewToTarget_WhenNotConnected_ThenThrowsException()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user