Added new feature to allow the guiding style to be forced, Auto = driver decides. Pulse guiding will use the newer pulse guiding technique, Guide rate slew, will use the older technique.
This commit is contained in:
@@ -34,7 +34,8 @@ namespace Meade.net.Telescope.UnitTests
|
||||
TraceLogger = false,
|
||||
ComPort = "TestCom1",
|
||||
GuideRateArcSecondsPerSecond = 1.23,
|
||||
Precision = "Unchanged"
|
||||
Precision = "Unchanged",
|
||||
GuidingStyle = "Auto"
|
||||
};
|
||||
|
||||
_utilMock = new Mock<IUtil>();
|
||||
@@ -446,17 +447,24 @@ namespace Meade.net.Telescope.UnitTests
|
||||
_sharedResourcesWrapperMock.Verify(x => x.Disconnect(It.IsAny<string>(), It.IsAny<string>()), Times.Once());
|
||||
}
|
||||
|
||||
[TestCase("Autostar", "30Ab", false)]
|
||||
[TestCase("Autostar", "31Ee", true)]
|
||||
[TestCase("Autostar", "43Eg", true)]
|
||||
[TestCase("Autostar II", "", false)]
|
||||
[TestCase("LX2001", "", true)]
|
||||
[TestCase(":GVP", "", false)] //LX200 Classic
|
||||
public void IsNewPulseGuidingSupported_ThenIsSupported_ThenReturnsTrue(string productName, string firmware, bool isSupported)
|
||||
[TestCase("Auto", "Autostar", "30Ab", false)]
|
||||
[TestCase("Auto","Autostar", "31Ee", true)]
|
||||
[TestCase("Auto","Autostar", "43Eg", true)]
|
||||
[TestCase("Auto","Autostar II", "", false)]
|
||||
[TestCase("Auto","LX2001", "", true)]
|
||||
[TestCase("Auto",":GVP", "", false)] //LX200 Classic
|
||||
[TestCase("Guide Rate Slew", "LX2001", "", false)] //force old style
|
||||
[TestCase("Pulse Guiding", ":GVP", "", true)] //force new style
|
||||
|
||||
public void IsNewPulseGuidingSupported_ThenIsSupported_ThenReturnsTrue(string guidingStyle, string productName, string firmware, bool isSupported)
|
||||
{
|
||||
_sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(productName);
|
||||
_sharedResourcesWrapperMock.Setup(x => x.FirmwareVersion).Returns(firmware);
|
||||
|
||||
_profileProperties.GuidingStyle = guidingStyle;
|
||||
|
||||
_telescope.Connected = true;
|
||||
|
||||
var result = _telescope.IsNewPulseGuidingSupported();
|
||||
|
||||
Assert.That(result, Is.EqualTo(isSupported));
|
||||
|
||||
Reference in New Issue
Block a user