mirror of
https://github.com/fbarresi/Sharp7.git
synced 2026-02-04 16:42:53 +00:00
26 lines
551 B
C#
26 lines
551 B
C#
using System;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
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();
|
|
}
|
|
}
|
|
} |