Code inspection cleanup

This commit is contained in:
2019-10-22 21:51:59 +01:00
parent ba0ae056ea
commit 2cbb1fb68c
6 changed files with 54 additions and 87 deletions
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
@@ -110,10 +110,11 @@ namespace Meade.net.UnitTests
SharedResources.ProfileFactory = profileFactoryMock.Object;
var profileProperties = new ProfileProperties();
profileProperties.TraceLogger = false;
profileProperties.ComPort = "TestComPort";
var profileProperties = new ProfileProperties
{
TraceLogger = false,
ComPort = "TestComPort"
};
SharedResources.WriteProfile(profileProperties);
@@ -246,10 +247,8 @@ namespace Meade.net.UnitTests
SharedResources.ProfileFactory = profileFactoryMock.Object;
string serialPortReturn = string.Empty;
_serialMock.Setup(x => x.Transmit(":GVP#")).Callback(() => { serialPortReturn = ":GVP#"; });
_serialMock.Setup(x => x.ReceiveTerminated("#")).Returns(() => { throw new Exception("Testerror"); });
_serialMock.Setup(x => x.Transmit(":GVP#")).Callback(() => { });
_serialMock.Setup(x => x.ReceiveTerminated("#")).Returns(() => throw new Exception("Testerror"));
var connectionResult = SharedResources.Connect(deviceId, string.Empty);