public async Task GivenACompaniesHouseCompanyFilingHistoryClient_WhenGettingAFilingHistoryItem(CompaniesHouseCompanyFilingHistoryClientTestCase testCase)
        {
            var filingHistory = CompanyFilingHistoryBuilder.BuildOne(testCase);
            var resource      = CompanyFilingHistoryResourceBuilder.CreateOne(filingHistory);

            var uri = new Uri("https://wibble.com/company/1/filing-history/1");

            HttpMessageHandler handler = new StubHttpMessageHandler(uri, resource);

            var uriBuilder = new Mock <ICompanyFilingHistoryUriBuilder>();

            uriBuilder.Setup(x => x.Build(It.IsAny <string>(), It.IsAny <string>())).Returns(uri);

            var client = new CompaniesHouseCompanyFilingHistoryClient(new HttpClient(handler), uriBuilder.Object);

            var result = await client.GetFilingHistoryByTransactionAsync("abc", "id1");

            result.Data.ShouldBeEquivalentTo(filingHistory);
        }
        public async Task GivenACompaniesHouseCompanyProfileClient_WhenGettingACompanyProfile(CompaniesHouseCompanyFilingHistoryClientTestCase testCase)
        {
            var companyFilingHistory = CompanyFilingHistoryBuilder.Build(testCase);
            var resource             = new CompanyFilingHistoryResourceBuilder(companyFilingHistory)
                                       .Create();

            var uri = new Uri("https://wibble.com/search/companies");

            HttpMessageHandler handler = new StubHttpMessageHandler(uri, resource);

            var uriBuilder = new Mock <ICompanyFilingHistoryUriBuilder>();

            uriBuilder.Setup(x => x.Build(It.IsAny <string>(), It.IsAny <int>(), It.IsAny <int>()))
            .Returns(uri);

            var client = new CompaniesHouseCompanyFilingHistoryClient(new HttpClient(handler), uriBuilder.Object);

            var result = await client.GetCompanyFilingHistoryAsync("abc", 0, 25);

            result.Data.ShouldBeEquivalentTo(companyFilingHistory);
        }