public async Task GetAudioApplicationAsync_Returns_AudioApplicationInfoResponse() { var wowzaResponse = new WowzaGetApplicationResponse { Description = "Description", Name = "Name", ServerName = "ServerName", StreamConfig = new Streamconfig { KeyDir = "KeyDir", ServerName = "ServerName", StorageDir = "StorageDir", StreamType = "StreamType", StorageDirExists = true } }; _audioPlatformService .Setup(x => x.GetAudioApplicationInfoAsync(It.IsAny <Guid>())) .ReturnsAsync(wowzaResponse); var result = await _controller.GetAudioApplicationAsync(It.IsAny <Guid>()) as OkObjectResult; result.Should().NotBeNull(); result.StatusCode.Should().Be(StatusCodes.Status200OK); var response = result.Value as AudioApplicationInfoResponse; response.Should().NotBeNull(); response.Should().BeEquivalentTo(wowzaResponse, options => options.ExcludingMissingMembers()); }
public static AudioApplicationInfoResponse MapToAudioApplicationInfo(WowzaGetApplicationResponse response) { return(new AudioApplicationInfoResponse { Description = response.Description, Name = response.Name, ServerName = response.ServerName, StreamConfig = MapToAudioApplicationStreamConfigResponse(response.StreamConfig) }); }