public async Task MonitoringStreamRecorderAsync_Success() { // Case 1 var wowzaHttpClient = new WowzaHttpClient(new HttpClient(new FakeHttpMessageHandler()) { BaseAddress = new Uri($"http://{HttpStatusCode.OK}.com/") }); var result = await wowzaHttpClient.MonitoringStreamRecorderAsync ( It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>() ); result.Should().NotBeNull(); }
public void MonitoringStreamRecorderAsync_Throws_AudioPlatformException_On_Http_Failure() { // Case 1 var wowzaHttpClient = new WowzaHttpClient(new HttpClient(new FakeHttpMessageHandler()) { BaseAddress = new Uri($"http://{nameof(Exception)}.com/") }); var exception = Assert.ThrowsAsync <Exception> ( () => wowzaHttpClient.MonitoringStreamRecorderAsync ( It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>() ) ); exception.Message.Should().Be("Exception thrown"); }