Refactored the error message

This commit is contained in:
2020-09-03 21:04:28 +01:00
parent 89600c463b
commit 03f2022f2f
2 changed files with 10 additions and 12 deletions
@@ -375,11 +375,11 @@ namespace Meade.net.UnitTests
_serialMock.Setup(x => x.Transmit("#:GG#")).Callback(() => { serialPortReturn = ""; });
_serialMock.Setup(x => x.ReceiveTerminated("#")).Returns(() => serialPortReturn);
var result = Assert.Throws<FormatException>(() =>
var result = Assert.Throws<Exception>(() =>
{
SharedResources.Connect(deviceId, string.Empty, _traceLoggerMock.Object);
});
Assert.That(result.Message, Is.EqualTo("Input string was not in a correct format."));
Assert.That(result.Message, Is.EqualTo("Unable to decode response from the telescope, This is likely a hardware serial communications error."));
_traceLoggerMock.Verify( x => x.LogIssue("Connect", "Unable to decode response from the telescope, This is likely a hardware serial communications error."), Times.Once);
}