This commit is contained in:
@@ -95,10 +95,10 @@ namespace raven_integration
|
|||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
|
||||||
//Now validate the return list
|
//Now validate the return list
|
||||||
((JArray)a.ObjectResponse["result"]).Count.Should().BeGreaterOrEqualTo(3);
|
((JArray)a.ObjectResponse["result"]["searchResults"]).Count.Should().BeGreaterOrEqualTo(3);
|
||||||
|
|
||||||
//Turn the list into an array of id's
|
//Turn the list into an array of id's
|
||||||
var v = ((JArray)a.ObjectResponse["result"]);
|
var v = ((JArray)a.ObjectResponse["result"]["searchResults"]);
|
||||||
List<long> MatchingIdList = new List<long>();
|
List<long> MatchingIdList = new List<long>();
|
||||||
foreach (JObject j in v)
|
foreach (JObject j in v)
|
||||||
{
|
{
|
||||||
@@ -114,10 +114,10 @@ namespace raven_integration
|
|||||||
|
|
||||||
//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)
|
//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
|
//first item must be a widget
|
||||||
a.ObjectResponse["result"][0]["type"].Value<int>().Should().Be(2);
|
a.ObjectResponse["result"]["searchResults"][0]["type"].Value<int>().Should().Be(2);
|
||||||
|
|
||||||
//final item must be a user
|
//final item must be a user
|
||||||
a.ObjectResponse["result"][MatchingIdList.Count - 1]["type"].Value<int>().Should().Be(3);
|
a.ObjectResponse["result"]["searchResults"][MatchingIdList.Count - 1]["type"].Value<int>().Should().Be(3);
|
||||||
|
|
||||||
|
|
||||||
//FULL BODY SEARCH RIGHTS
|
//FULL BODY SEARCH RIGHTS
|
||||||
@@ -129,7 +129,7 @@ namespace raven_integration
|
|||||||
//This search should return zero items
|
//This search should return zero items
|
||||||
a = await Util.PostAsync("Search", await Util.GetTokenAsync("SubContractorLimited"), SearchParameters.ToString());
|
a = await Util.PostAsync("Search", await Util.GetTokenAsync("SubContractorLimited"), SearchParameters.ToString());
|
||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
((JArray)a.ObjectResponse["result"]).Count.Should().Be(0, "User with no rights should not see any results in body search");
|
((JArray)a.ObjectResponse["result"]["searchResults"]).Count.Should().Be(0, "User with no rights should not see any results in body search");
|
||||||
|
|
||||||
|
|
||||||
//NAME ONLY SEARCH SHOULD WORK WITH NO RIGHTS TO READ FULL RECORD
|
//NAME ONLY SEARCH SHOULD WORK WITH NO RIGHTS TO READ FULL RECORD
|
||||||
@@ -140,10 +140,10 @@ namespace raven_integration
|
|||||||
SearchParameters.typeOnly = 0;//no type
|
SearchParameters.typeOnly = 0;//no type
|
||||||
a = await Util.PostAsync("Search", await Util.GetTokenAsync("SubContractorLimited"), SearchParameters.ToString());
|
a = await Util.PostAsync("Search", await Util.GetTokenAsync("SubContractorLimited"), SearchParameters.ToString());
|
||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
((JArray)a.ObjectResponse["result"]).Count.Should().BeGreaterOrEqualTo(2);
|
((JArray)a.ObjectResponse["result"]["searchResults"]).Count.Should().BeGreaterOrEqualTo(2);
|
||||||
//Check that list does *not* include the notes only records
|
//Check that list does *not* include the notes only records
|
||||||
MatchingIdList = new List<long>();
|
MatchingIdList = new List<long>();
|
||||||
v = ((JArray)a.ObjectResponse["result"]);
|
v = ((JArray)a.ObjectResponse["result"]["searchResults"]);
|
||||||
foreach (JObject j in v)
|
foreach (JObject j in v)
|
||||||
{
|
{
|
||||||
MatchingIdList.Add(j["id"].Value<long>());
|
MatchingIdList.Add(j["id"].Value<long>());
|
||||||
@@ -205,10 +205,10 @@ namespace raven_integration
|
|||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
|
||||||
//Now validate the return list
|
//Now validate the return list
|
||||||
((JArray)a.ObjectResponse["result"]).Count.Should().BeGreaterOrEqualTo(2);
|
((JArray)a.ObjectResponse["result"]["searchResults"]).Count.Should().BeGreaterOrEqualTo(2);
|
||||||
|
|
||||||
//Turn the list into an array of id's
|
//Turn the list into an array of id's
|
||||||
var v = ((JArray)a.ObjectResponse["result"]);
|
var v = ((JArray)a.ObjectResponse["result"]["searchResults"]);
|
||||||
List<long> MatchingIdList = new List<long>();
|
List<long> MatchingIdList = new List<long>();
|
||||||
foreach (JObject j in v)
|
foreach (JObject j in v)
|
||||||
{
|
{
|
||||||
@@ -266,10 +266,10 @@ namespace raven_integration
|
|||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
|
||||||
//Now validate the return list
|
//Now validate the return list
|
||||||
((JArray)a.ObjectResponse["result"]).Count.Should().BeGreaterOrEqualTo(2);
|
((JArray)a.ObjectResponse["result"]["searchResults"]).Count.Should().BeGreaterOrEqualTo(2);
|
||||||
|
|
||||||
//Turn the list into an array of id's
|
//Turn the list into an array of id's
|
||||||
var v = ((JArray)a.ObjectResponse["result"]);
|
var v = ((JArray)a.ObjectResponse["result"]["searchResults"]);
|
||||||
List<long> MatchingIdList = new List<long>();
|
List<long> MatchingIdList = new List<long>();
|
||||||
foreach (JObject j in v)
|
foreach (JObject j in v)
|
||||||
{
|
{
|
||||||
@@ -329,10 +329,10 @@ namespace raven_integration
|
|||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
|
||||||
//Now validate the return list
|
//Now validate the return list
|
||||||
((JArray)a.ObjectResponse["result"]).Count.Should().BeGreaterOrEqualTo(2);
|
((JArray)a.ObjectResponse["result"]["searchResults"]).Count.Should().BeGreaterOrEqualTo(2);
|
||||||
|
|
||||||
//Turn the list into an array of id's
|
//Turn the list into an array of id's
|
||||||
var v = ((JArray)a.ObjectResponse["result"]);
|
var v = ((JArray)a.ObjectResponse["result"]["searchResults"]);
|
||||||
List<long> MatchingIdList = new List<long>();
|
List<long> MatchingIdList = new List<long>();
|
||||||
foreach (JObject j in v)
|
foreach (JObject j in v)
|
||||||
{
|
{
|
||||||
@@ -431,10 +431,10 @@ namespace raven_integration
|
|||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
|
||||||
//Now validate the return list
|
//Now validate the return list
|
||||||
((JArray)a.ObjectResponse["result"]).Count.Should().BeGreaterOrEqualTo(1);
|
((JArray)a.ObjectResponse["result"]["searchResults"]).Count.Should().BeGreaterOrEqualTo(1);
|
||||||
|
|
||||||
//Turn the list into an array of id's
|
//Turn the list into an array of id's
|
||||||
var v = ((JArray)a.ObjectResponse["result"]);
|
var v = ((JArray)a.ObjectResponse["result"]["searchResults"]);
|
||||||
List<long> MatchingIdList = new List<long>();
|
List<long> MatchingIdList = new List<long>();
|
||||||
foreach (JObject j in v)
|
foreach (JObject j in v)
|
||||||
{
|
{
|
||||||
@@ -475,7 +475,7 @@ namespace raven_integration
|
|||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
|
||||||
//Now validate the return list
|
//Now validate the return list
|
||||||
var ResultCount = ((JArray)a.ObjectResponse["result"]).Count;
|
var ResultCount = ((JArray)a.ObjectResponse["result"]["searchResults"]).Count;
|
||||||
//assert it's not unbounded
|
//assert it's not unbounded
|
||||||
ResultCount.Should().BeLessOrEqualTo(1000);
|
ResultCount.Should().BeLessOrEqualTo(1000);
|
||||||
|
|
||||||
@@ -510,7 +510,7 @@ namespace raven_integration
|
|||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
|
|
||||||
//Now validate the return list
|
//Now validate the return list
|
||||||
var ResultCount = ((JArray)a.ObjectResponse["result"]).Count;
|
var ResultCount = ((JArray)a.ObjectResponse["result"]["searchResults"]).Count;
|
||||||
|
|
||||||
|
|
||||||
//Set this time based on testing. 52385 Slowest run plus 10%
|
//Set this time based on testing. 52385 Slowest run plus 10%
|
||||||
|
|||||||
Reference in New Issue
Block a user