diff --git a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs index b6fc5b3..808ea3b 100644 --- a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs +++ b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs @@ -1041,8 +1041,8 @@ namespace Meade.net.Telescope.UnitTests var ra = 12d; var dec = 34d; - _utilMock.Setup(x => x.HoursToHMS(ra, ":", ":", ".", 0)).Returns(ra + "HM"); - _utilMock.Setup(x => x.DegreesToDMS(dec, "*", ":", ".", 0)).Returns(dec + "DM"); + _utilMock.Setup(x => x.HoursToHMS(ra, ":", ".", "", 0)).Returns(ra + "HM"); + _utilMock.Setup(x => x.DegreesToDM(dec, "*", "", 0)).Returns(dec + "DM"); _utilMock.Setup(x => x.DMSToDegrees(_testProperties.TelescopeRaResult)).Returns(_testProperties.Declination); ConnectTelescope(TelescopeList.LX200CLASSIC); @@ -1064,8 +1064,8 @@ namespace Meade.net.Telescope.UnitTests secondTelescopeInstance.TargetRightAscension = ra; secondTelescopeInstance.TargetDeclination = dec; - _utilMock.Verify(x => x.HoursToHMS(ra, ":", ":", ".", 0), Times.Exactly(2)); - _utilMock.Verify(x => x.DegreesToDMS(dec, "*", ":", ".", 0), Times.Exactly(2)); + _utilMock.Verify(x => x.HoursToHMS(ra, ":", ".", "", 0), Times.Exactly(2)); + _utilMock.Verify(x => x.DegreesToDM(dec, "*", "", 0), Times.Exactly(2)); _utilMock.Verify(x => x.HoursToHMS(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), 2), Times.Never); _utilMock.Verify(x => x.DegreesToDMS(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), 2), Times.Never); } @@ -2517,7 +2517,7 @@ namespace Meade.net.Telescope.UnitTests { _sharedResourcesWrapperMock.Setup(x => x.SendChar(_traceLoggerMock.Object, It.IsAny(), false)).Returns("0"); _utilMock.Setup(x => x.HoursToHMS(It.IsAny(), ":", ":", ":", It.IsAny())).Returns("00:00:00.00"); - _utilMock.Setup(x => x.HoursToHMS(It.IsAny(), ":", ":", ".", 0)).Returns("00:00.00"); + _utilMock.Setup(x => x.HoursToHMS(It.IsAny(), ":", ".", "", 0)).Returns("00:00.00"); ConnectTelescope(); diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index 56d31f6..db9cf01 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -3432,7 +3432,7 @@ namespace ASCOM.Meade.net } catch (InvalidOperationException) { - dms = SetTargetDeclination(value, !SharedResourcesWrapper.IsLongFormat); //todo add unit test for this scenario + dms = SetTargetDeclination(value, !SharedResourcesWrapper.IsLongFormat); } SharedResourcesWrapper.TargetDeclination = _utilities.DMSToDegrees(dms); @@ -3450,7 +3450,7 @@ namespace ASCOM.Meade.net var dms = useLongFormat ? _utilities.DegreesToDMS(value, "*", ":", ":", _digitsDe) //: _utilities.DegreesToDM(value, "*", "", _digitsDe); - : _utilities.DegreesToDMS(value, "*", ":", ".", 0); + : _utilities.DegreesToDM(value, "*", "", 0); var s = value < 0 ? string.Empty : "+"; @@ -3520,7 +3520,7 @@ namespace ASCOM.Meade.net } catch (InvalidOperationException) { - hms = SetTargetRightAscension(value, !SharedResourcesWrapper.IsLongFormat); //todo add unit test for this scenario + hms = SetTargetRightAscension(value, !SharedResourcesWrapper.IsLongFormat); } SharedResourcesWrapper.TargetRightAscension = _utilities.HMSToHours(hms); @@ -3538,7 +3538,7 @@ namespace ASCOM.Meade.net var hms = useLongFormat ? _utilities.HoursToHMS(value, ":", ":", ":", _digitsRa) //: _utilities.HoursToHM(value, ":", "", _digitsRa).Replace(',', '.'); - : _utilities.HoursToHMS(value, ":", ":", ".", 0); + : _utilities.HoursToHMS(value, ":", ".", "", 0); hms = hms.TrimEnd(':');