diff --git a/test/raven-integration/Search/SearchOps.cs b/test/raven-integration/Search/SearchOps.cs index b526556c..00b1f7c1 100644 --- a/test/raven-integration/Search/SearchOps.cs +++ b/test/raven-integration/Search/SearchOps.cs @@ -91,17 +91,58 @@ namespace raven_integration MatchingIdList.Add(j["id"].Value()); } + //Ensure the expected items are returned MatchingIdList.Should().Contain(MatchFirstWidgetId, "ShouldContainFirstWidget"); MatchingIdList.Should().Contain(MatchSecondWidgetId, "ShouldContainSecondWidget"); MatchingIdList.Should().Contain(MatchUserId, "ShouldContainUser"); MatchingIdList.Should().NotContain(NoMatchThirdWidgetId, "ShouldNotContainThirdWidget"); - //Assert the order, the first item should be a lower object type than the last item, the first should be + //Assert the order (roughly, this is kind of a waste of time, either the code is sorting or not, it's not going to change) + //first item must be a widget + a.ObjectResponse["result"][0]["type"].Value().Should().Be(2); + + //final item must be a user + a.ObjectResponse["result"][MatchingIdList.Count - 1]["type"].Value().Should().Be(3); }//eot - + /* + {{ + "result": [ + { + "name": "Search simple as in dogs SECOND Test WIDGET1537899693", + "type": 2, + "id": 205 + }, + { + "name": "Search Simple Test WIDGET1537899693", + "type": 2, + "id": 204 + }, + { + "name": "Search simple as in dogs SECOND Test WIDGET1537899490", + "type": 2, + "id": 202 + }, + { + "name": "Search Simple Test WIDGET1537899489", + "type": 2, + "id": 201 + }, + { + "name": "Search simple Test User1537899693", + "type": 3, + "id": 22 + }, + { + "name": "Search simple Test User1537899490", + "type": 3, + "id": 21 + } + ] + }} + */