public void Should_map_all_properties()
        {
            var conferencesForAdminResponse = new ConferencesForAdminResponseBuilder().Build();
            var conferencesResponse         = new ConferenceResponseBuilder(conferencesForAdminResponse).BuildFromAdminResponse();

            var response = ConferencesResponseMapper.Map(conferencesForAdminResponse);

            response.Should().BeEquivalentTo(conferencesResponse, options => options.ExcludingMissingMembers());
        }
示例#2
0
        public async Task <IActionResult> GetConferencesForTodayAsync()
        {
            _logger.LogDebug("GetConferencesForTodayAsync");

            try
            {
                var conferencesResponse = await _testApiClient.GetConferencesForTodayVhoAsync();

                var conferences = ConferencesResponseMapper.Map(conferencesResponse);
                return(Ok(conferences));
            }
            catch (TestApiException e)
            {
                _logger.LogError(e, "Unable to fetch conferences with error '{message}'", e.Message);
                return(StatusCode(e.StatusCode, e.Response));
            }
        }