diff --git a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs index 7d5f056..e2e7796 100644 --- a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs +++ b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs @@ -2291,6 +2291,21 @@ namespace Meade.net.Telescope.UnitTests 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(() => { _telescope.SlewToTargetAsync(); }); + Assert.That(exception.Message, Is.EqualTo("the telescope can hit the tripod")); + } + [Test] public void SlewToTarget_WhenNotConnected_ThenThrowsException() {