/// <summary> /// Creates a new <see cref="CustomClientMock"/> instance. /// </summary> public CustomClientMock() : base(null) { this.SocketMock = new NetSocketMock(); this.SetupGet(x => x.Socket).Returns(this.SocketMock); }
public NetClientTests() { var configuration = new NetClientConfiguration("127.0.0.1", 4444); _socketMock = new NetSocketMock(); _client = new Mock <NetClient>(configuration); _client.SetupGet(x => x.Socket).Returns(_socketMock); }
public NetServerTests() { _socketMock = new NetSocketMock(); _socketMock.ConfigureAcceptResult(true); _serverConfiguration = new NetServerConfiguration("127.0.0.1", 4444); _server = new NetServerMock <CustomClient>(_serverConfiguration); _server.SetupGet(x => x.Socket).Returns(_socketMock); }
public NetAcceptorTests() { _serverSocket = new NetSocketMock(); _acceptedSocket = new NetSocketMock(); _serverConfiguration = new NetServerConfiguration("127.0.0.1", 4444); _server = new NetServerMock<CustomClient>(_serverConfiguration); _serverAcceptor = new NetServerAcceptor(_server.Object); _server.SetupGet(x => x.Socket).Returns(_serverSocket); }