diff --git a/S7.Net.UnitTest/ProtocolTests.cs b/S7.Net.UnitTest/ProtocolTests.cs index 4d53f17..b18ebe8 100644 --- a/S7.Net.UnitTest/ProtocolTests.cs +++ b/S7.Net.UnitTest/ProtocolTests.cs @@ -13,7 +13,7 @@ namespace S7.Net.UnitTest [TestClass] public class ProtocolUnitTest { - private TestContext TestContext { get; set; } + public TestContext TestContext { get; set; } [TestMethod] public async Task TPKT_Read() diff --git a/S7.Net.UnitTest/S7NetTestsSync.cs b/S7.Net.UnitTest/S7NetTestsSync.cs index 0ad4efa..162c5a2 100644 --- a/S7.Net.UnitTest/S7NetTestsSync.cs +++ b/S7.Net.UnitTest/S7NetTestsSync.cs @@ -38,6 +38,7 @@ namespace S7.Net.UnitTest const int DB2 = 2; const int DB4 = 4; const short TestServerPort = 31122; + const string TestServerIp = "127.0.0.1"; #endregion #region Private fields @@ -56,7 +57,7 @@ namespace S7.Net.UnitTest private static Plc CreatePlc() { - return new Plc(CpuType.S7300, "localhost", TestServerPort, 0, 2); + return new Plc(CpuType.S7300, TestServerIp, TestServerPort, 0, 2); } [TestInitialize] diff --git a/S7.Net.UnitTest/StreamTests.cs b/S7.Net.UnitTest/StreamTests.cs index 375c02c..9cb0969 100644 --- a/S7.Net.UnitTest/StreamTests.cs +++ b/S7.Net.UnitTest/StreamTests.cs @@ -65,7 +65,7 @@ namespace S7.Net.UnitTest [TestClass] public class StreamTests { - private TestContext TestContext { get; set; } + public TestContext TestContext { get; set; } [TestMethod] public async Task TPKT_ReadRestrictedStreamAsync()