Exemplo n.º 1
0
 private static async Task Start()
 {
     using (var networkingService = new NetworkingService(
                new TcpClientWrapper(),
                new IoService(),
                new ConfigurationProvider()))
     {
         await networkingService.Connect();
     }
 }
Exemplo n.º 2
0
        public async Task WillConnectAsync()
        {
            // arrange
            SetupDefaultTestValues();

            // act
            await _networkingService.Connect();

            // assert
            _tcpClientMock.Verify(x => x.ConnectAsync(_host, _port), Times.Once());
        }