Beispiel #1
0
        public void SearchPublicSectorOrganisation_WithTrickyParams_ShouldEncodeParamsCorrectly()
        {
            var fixtures = new ReferenceDataApiClientTestFixtures()
                           .WithBaseUrl(@"http://some-url/api/organisations/")
                           .WithSearchPublicSectorResult(complexSearchTerm, startPage, pageSize, new PublicSectorOrganisation());

            fixtures.GetSearchPublicSectorAsync(complexSearchTerm);

            fixtures.ChackUrlCalled(fixtures.BuildSearchPublicSectorUrl(complexSearchTerm, startPage, pageSize));
        }
Beispiel #2
0
        public void SearchPublicSectorOrganisation_WithValidParams_ShouldCallTheApiWithTheCorrectUrl()
        {
            var fixtures = new ReferenceDataApiClientTestFixtures()
                           .WithBaseUrl(@"http://some-url/api/organisations/")
                           .WithSearchPublicSectorResult(searchTerm, startPage, pageSize, new PublicSectorOrganisation());

            fixtures.GetSearchPublicSectorAsync(searchTerm);

            fixtures.ChackUrlCalled(fixtures.BuildSearchPublicSectorUrl(searchTerm, startPage, pageSize));
        }