public void ItUsesSectionFactoryToBuildProcessedSectionFromSection() { var section = new Section(TextHelper.AnyString, TextHelper.AnyString, TextHelper.AnyString, TextHelper.AnyString, new List <Profile>(), new List <Document>(), new List <Alert>()); var processedSection = _factory.Build <Section>(section); processedSection.Should().BeOfType <ProcessedSection>(); }
public async Task <HttpResponse> Get <T>(string slug = "", List <Query> queries = null) { var url = _urlGenerator.UrlFor <T>(slug, queries); var httpResponse = await _httpClient.Get(url, authenticationHeaders); if (!httpResponse.IsSuccessful()) { return(httpResponse); } var model = HttpResponse.Build <T>(httpResponse); var processedModel = _contentTypeFactory.Build((T)model.Content); return(HttpResponse.Successful(200, processedModel)); }