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:
25
Sharp7.Tests/ServerTestBase.cs
Normal file
25
Sharp7.Tests/ServerTestBase.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Shouldly;
|
||||
|
||||
namespace Sharp7.Tests
|
||||
{
|
||||
public class ServerTestBase : IDisposable
|
||||
{
|
||||
private readonly S7Server server;
|
||||
protected readonly string Localhost = "127.0.0.1";
|
||||
public ServerTestBase()
|
||||
{
|
||||
server = new S7Server();
|
||||
var rc = server.StartTo(Localhost);
|
||||
rc.ShouldBe(0);
|
||||
}
|
||||
|
||||
public S7Server Server => server;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
server.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user