Created
October 29, 2013 19:43
-
-
Save danielwertheim/7221261 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public void Can_search_on_default_index() | |
{ | |
var searchRequest = new SearchIndexRequest(CloudantTestData.Views.Views101AnimalsSearchIndexId) | |
.Configure(q => q.Expression("kookaburra")); | |
var response = SUT.SearchAsync(searchRequest).Result; | |
response.Should().BeSuccessfulGet(numOfRows: 1); | |
response.Bookmark.Should().NotBeNullOrEmpty(); | |
response.Rows[0].Id.Should().Be("kookaburra"); | |
response.Rows[0].Order.Should().BeEquivalentTo(new[] {1.4054651260375977, 0}); | |
response.Rows[0].Fields.Count.Should().Be(4); | |
response.Rows[0].Fields["diet"].Should().Be("carnivore"); | |
response.Rows[0].Fields["minLength"].Should().Be(0.28); | |
response.Rows[0].Fields["class"].Should().Be("bird"); | |
response.Rows[0].Fields["latinName"].Should().Be("Dacelo novaeguineae"); | |
response.Rows[0].IncludedDoc.Should().BeNull(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment