This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using Xunit;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace raven_integration
|
||||
{
|
||||
@@ -66,8 +68,22 @@ namespace raven_integration
|
||||
a = await Util.PostAsync("Search", await Util.GetTokenAsync("manager", "l3tm3in"), SearchParameters.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
|
||||
//Now validate the return list
|
||||
((JArray)a.ObjectResponse["result"]).Count.Should().BeGreaterOrEqualTo(2);
|
||||
|
||||
}
|
||||
//Turn the list into an array of id's
|
||||
var v = ((JArray)a.ObjectResponse["result"]);
|
||||
List<long> MatchingIdList = new List<long>();
|
||||
foreach (JObject j in v)
|
||||
{
|
||||
MatchingIdList.Add(j["id"].Value<long>());
|
||||
}
|
||||
|
||||
MatchingIdList.Should().Contain(MatchFirstWidgetId, "ShouldContainFirstWidget");
|
||||
MatchingIdList.Should().Contain(MatchSecondWidgetId, "ShouldContainSecondWidget");
|
||||
MatchingIdList.Should().NotContain(NoMatchThirdWidgetId, "ShouldNotContainThirdWidget");
|
||||
|
||||
}//eot
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user