public void SendAsync_RequestNull() { var next = new Mock <IHttpService>(MockBehavior.Strict).Object; var uut = new HttpReadService(next); Assert.ThrowsAsync <ArgumentNullException>( async() => await uut.SendAsync(null) ); }
public async Task SendAsync() { var request = new HttpRequestMessage(); var response = new HttpResponseMessage(); var next = new Mock <IHttpService>(MockBehavior.Strict); next.Setup(n => n.SendAsync(request)).ReturnsAsync(response); var uut = new HttpReadService(next.Object); var result = await uut.SendAsync(request); }