zerlei
78d9e68fea
原因是: 1. 相互独立的单元测试,有助于debug问题, 2. 不需要考虑执行顺序,额外的运行环境等,更加简单。 做的工作是: 1. 去掉了顺序执行,这有助于并发调用,减少测试时间 2. 去掉了测试方法中共享的实例
20 lines
396 B
C#
20 lines
396 B
C#
using System.Net.WebSockets;
|
|
|
|
namespace LocalServer;
|
|
|
|
public class LocalSyncServer
|
|
{
|
|
public readonly WebSocket Socket;
|
|
public readonly string Name;
|
|
|
|
public readonly LocalSyncServerFactory Factory;
|
|
|
|
public LocalSyncServer(WebSocket socket, string name, LocalSyncServerFactory factory)
|
|
{
|
|
Socket = socket;
|
|
Name = name;
|
|
Factory = factory;
|
|
|
|
}
|
|
}
|