/// <summary> /// Create a plc that will connect to localhost (Snap 7 server) and connect to it /// </summary> public S7NetTests() { plc = new Plc(CpuType.S7300, "127.0.0.1", 0, 2); //ConsoleManager.Show(); ShutDownServiceS7oiehsx64(); S7TestServer.Start(); plc.Open(); }
public void T25_IsAvailableReturnsTrueIfIPAddressIsReachable() { plc.Close(); S7TestServer.Stop(); S7TestServer.Start(TestServerPort); var reachablePlc = CreatePlc(); Assert.IsTrue(reachablePlc.IsAvailable); }
public void T25_IsAvailableReturnsTrueIfIPAddressIsReachable() { plc.Close(); S7TestServer.Stop(); S7TestServer.Start(); var reachablePlc = new Plc(CpuType.S7300, "127.0.0.1", 0, 2); Assert.IsTrue(reachablePlc.IsAvailable); }
public void Setup() { S7TestServer.Start(TestServerPort); plc.Open(); }
public void SetupAsync() { S7TestServer.Start(); plc.Open(); }