public void EchoProtocolMethodSyncTest() { //Arrange var log = new Mock <ILogger>(); EchoProtocol protocol = new EchoProtocol(); //Act var result = protocol.SendRequestAsync(log.Object).Result; //Assert Assert.IsNotNull(result); Assert.IsTrue(result.GetStatus); }
public async Task EchoProtocolMethodASyncTest() { //Arrange var log = new Mock <ILogger>(); EchoProtocol protocol = new EchoProtocol() { HostName = "online.gameroom.ru" }; //Act var result = await protocol.SendRequestAsync(log.Object); //Assert Assert.IsNotNull(result); Assert.IsFalse(result.GetStatus); }