mirror of
https://github.com/fbarresi/Sharp7.git
synced 2026-02-04 08:42:51 +00:00
added tests for sharp7 client
This commit is contained in:
26
Sharp7.Tests/ServerClientTestBase.cs
Normal file
26
Sharp7.Tests/ServerClientTestBase.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Shouldly;
|
||||
|
||||
namespace Sharp7.Tests
|
||||
{
|
||||
public class ServerClientTestBase : ServerTestBase, IDisposable
|
||||
{
|
||||
private S7Client client;
|
||||
public S7Client Client => client;
|
||||
|
||||
public ServerClientTestBase() : base()
|
||||
{
|
||||
client = new S7Client();
|
||||
var rc = client.ConnectTo(Localhost, 0, 2);
|
||||
rc.ShouldBe(0);
|
||||
}
|
||||
|
||||
|
||||
public new void Dispose()
|
||||
{
|
||||
client.Disconnect();
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user