コード例 #1
0
        public void WhenSearchingForAPerson_AndAPageNumberIsSpecified_ItShouldReturnTheResultsForThatPage()
        {
            var query = new PersonSearch("%").AtPage(100);
            query.Find();
            var people = query.Result();

            people.Should().NotBeNull();
            people.PageNumber.Should().Be(100, "PageNumber");
        }
コード例 #2
0
        public void WhenSearchingForAPerson_WithANameThatDoesntExists_ItShouldNotBeNull()
        {
            var query = new PersonSearch(Guid.NewGuid().ToString());
            query.Find();
            var people = query.Result();

            people.Should().NotBeNull();
            people.PageNumber.Should().Be(0, "PageNumber");
            people.AdditionalPages.Should().BeGreaterOrEqualTo(0, "AdditionalPages");
            people.Count.Should().Be(0);
        }
コード例 #3
0
        public void WhenSearchingForAPerson_WithANameOfMeyer_ItShouldReturnAPeopleSearchResults()
        {
            var query = new PersonSearch("Meyer");
            query.Find();
            var people = query.Result();

            people.Should().NotBeNull();
            people.PageNumber.Should().Be(1, "PageNumber");
            people.AdditionalPages.Should().BeGreaterOrEqualTo(0, "AdditionalPages");
            people.TotalRecords.Should().BeGreaterOrEqualTo(5, "TotalRecords");
            people.Count.Should().BeGreaterOrEqualTo(5);
        }
コード例 #4
0
 public void WhenSearchingForAPerson_WithNoNameSpecified_ItShouldBeTheSameAsAWildcardSearch()
 {
     var query = new PersonSearch(string.Empty);
     query.Find();
     var people = query.Result();
     people.Should().NotBeEmpty();
 }