This commit is contained in:
2020-02-26 19:33:31 +00:00
parent d5c7c4d7c6
commit 02af7eacc2
2 changed files with 93 additions and 91 deletions

View File

@@ -152,9 +152,9 @@ same as the server does but in a central location here for all tests to use.
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -240,9 +240,9 @@ same as the server does but in a central location here for all tests to use.
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -329,9 +329,9 @@ same as the server does but in a central location here for all tests to use.
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -412,9 +412,9 @@ same as the server does but in a central location here for all tests to use.
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -494,9 +494,9 @@ same as the server does but in a central location here for all tests to use.
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -576,9 +576,9 @@ same as the server does but in a central location here for all tests to use.
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -675,7 +675,7 @@ same as the server does but in a central location here for all tests to use.
d.filter = filter; d.filter = filter;
dListView.Add(d); dListView.Add(d);
//FETCH DATALIST //FETCH DATALIST
a = await Util.PostAsync($"DataList", await Util.GetTokenAsync("manager", "l3tm3in"), Util.BuildDataListRequestEx(dListView)); a = await Util.PostAsync($"DataList", await Util.GetTokenAsync("manager", "l3tm3in"), Util.BuildDataListRequestEx(dListView));
@@ -693,9 +693,9 @@ same as the server does but in a central location here for all tests to use.
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -829,9 +829,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -949,9 +949,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -1054,9 +1054,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -1158,9 +1158,9 @@ same as the server does but in a central location here for all tests to use.
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -1261,9 +1261,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -1365,9 +1365,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -1468,9 +1468,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -1571,9 +1571,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -1675,9 +1675,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -1777,9 +1777,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -1879,9 +1879,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -1980,9 +1980,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -2083,9 +2083,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -2188,9 +2188,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -2289,9 +2289,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -2369,9 +2369,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -2449,9 +2449,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -2531,9 +2531,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -2612,9 +2612,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -2693,9 +2693,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -2803,9 +2803,11 @@ same as the server does but in a central location here for all tests to use.
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (ActiveWidgetIdList.Contains(o["v"].Value<long>()))
if (ActiveWidgetIdList.Contains(o["i"].Value<long>()))
nActiveMatches++; nActiveMatches++;
if (NotActiveWidgetIdList.Contains(o["v"].Value<long>())) //if (NotActiveWidgetIdList.Contains(o["i"].Value<long>()))
if (NotActiveWidgetIdList.Contains(o["i"].Value<long>()))
nInactiveMatches++; nInactiveMatches++;
} }
@@ -2914,9 +2916,9 @@ same as the server does but in a central location here for all tests to use.
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (ActiveWidgetIdList.Contains(o["v"].Value<long>())) if (ActiveWidgetIdList.Contains(o["i"].Value<long>()))
nActiveMatches++; nActiveMatches++;
if (NotActiveWidgetIdList.Contains(o["v"].Value<long>())) if (NotActiveWidgetIdList.Contains(o["i"].Value<long>()))
nInactiveMatches++; nInactiveMatches++;
} }
@@ -3009,9 +3011,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -3090,9 +3092,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -3171,9 +3173,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -3254,9 +3256,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -3336,9 +3338,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -3419,9 +3421,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (IncludedWidgetId == o["v"].Value<long>()) if (IncludedWidgetId == o["i"].Value<long>())
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExcludedWidgetId == o["v"].Value<long>()) if (ExcludedWidgetId == o["i"].Value<long>())
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -3550,9 +3552,9 @@ same as the server does but in a central location here for all tests to use.
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -3674,9 +3676,9 @@ same as the server does but in a central location here for all tests to use.
foreach (JArray ja in v) foreach (JArray ja in v)
{ {
JObject o = ja[0] as JObject; JObject o = ja[0] as JObject;
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (InclusiveWidgetIdList.Contains(o["i"].Value<long>()))
InclusiveMatchCount++; InclusiveMatchCount++;
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>())) if (ExclusiveWidgetIdList.Contains(o["i"].Value<long>()))
ExclusiveMatchCount++; ExclusiveMatchCount++;
} }
@@ -3715,7 +3717,7 @@ same as the server does but in a central location here for all tests to use.
var TestName = "IdFilterWorks"; var TestName = "IdFilterWorks";
var WidgetNameStart = Util.Uniquify(TestName); var WidgetNameStart = Util.Uniquify(TestName);
//CREATE WIDGET //CREATE WIDGET
dynamic w = new JObject(); dynamic w = new JObject();
w.name = Util.Uniquify(WidgetNameStart); w.name = Util.Uniquify(WidgetNameStart);
@@ -3734,14 +3736,14 @@ same as the server does but in a central location here for all tests to use.
dListView.Add(Util.BuildSimpleFilterDataListViewColumn("widgetname", Util.OpEquality, Id)); dListView.Add(Util.BuildSimpleFilterDataListViewColumn("widgetname", Util.OpEquality, Id));
//FETCH DATALIST //FETCH DATALIST
a = await Util.PostAsync($"DataList", await Util.GetTokenAsync("manager", "l3tm3in"), Util.BuildDataListRequestEx(dListView)); a = await Util.PostAsync($"DataList", await Util.GetTokenAsync("manager", "l3tm3in"), Util.BuildDataListRequestEx(dListView));
Util.ValidateDataReturnResponseOk(a); Util.ValidateDataReturnResponseOk(a);
Util.ValidateHTTPStatusCode(a, 200); Util.ValidateHTTPStatusCode(a, 200);
//assert contains ONE record ONLY //assert contains ONE record ONLY
((JArray)a.ObjectResponse["data"]).Count.Should().Be(1); ((JArray)a.ObjectResponse["data"]).Count.Should().Be(1);
//assert it's ours //assert it's ours
((JArray)a.ObjectResponse["data"])[0][0]["v"].Value<long>().Should().Be(Id); ((JArray)a.ObjectResponse["data"])[0][0]["i"].Value<long>().Should().Be(Id);
// v[0]["v"].Value<long>() // v[0]["v"].Value<long>()
//DELETE WIDGET //DELETE WIDGET

View File

@@ -73,9 +73,9 @@ namespace raven_integration
((JArray)a.ObjectResponse["data"]).Count.Should().Be(3); ((JArray)a.ObjectResponse["data"]).Count.Should().Be(3);
//assert the order returned //assert the order returned
a.ObjectResponse["data"][0][0]["v"].Value<long>().Should().Be(FirstInOrderWidgetId); a.ObjectResponse["data"][0][0]["i"].Value<long>().Should().Be(FirstInOrderWidgetId);
a.ObjectResponse["data"][1][0]["v"].Value<long>().Should().Be(SecondInOrderWidgetId); a.ObjectResponse["data"][1][0]["i"].Value<long>().Should().Be(SecondInOrderWidgetId);
a.ObjectResponse["data"][2][0]["v"].Value<long>().Should().Be(ThirdInOrderWidgetId); a.ObjectResponse["data"][2][0]["i"].Value<long>().Should().Be(ThirdInOrderWidgetId);
a = await Util.DeleteAsync("Widget/" + FirstInOrderWidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in")); a = await Util.DeleteAsync("Widget/" + FirstInOrderWidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
@@ -166,9 +166,9 @@ namespace raven_integration
((JArray)a.ObjectResponse["data"]).Count.Should().Be(3); ((JArray)a.ObjectResponse["data"]).Count.Should().Be(3);
//assert the order returned //assert the order returned
a.ObjectResponse["data"][0][0]["v"].Value<long>().Should().Be(FirstInOrderWidgetId); a.ObjectResponse["data"][0][0]["i"].Value<long>().Should().Be(FirstInOrderWidgetId);
a.ObjectResponse["data"][1][0]["v"].Value<long>().Should().Be(SecondInOrderWidgetId); a.ObjectResponse["data"][1][0]["i"].Value<long>().Should().Be(SecondInOrderWidgetId);
a.ObjectResponse["data"][2][0]["v"].Value<long>().Should().Be(ThirdInOrderWidgetId); a.ObjectResponse["data"][2][0]["i"].Value<long>().Should().Be(ThirdInOrderWidgetId);
a = await Util.DeleteAsync("Widget/" + FirstInOrderWidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in")); a = await Util.DeleteAsync("Widget/" + FirstInOrderWidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
@@ -255,9 +255,9 @@ namespace raven_integration
((JArray)a.ObjectResponse["data"]).Count.Should().Be(3); ((JArray)a.ObjectResponse["data"]).Count.Should().Be(3);
//assert the order returned //assert the order returned
a.ObjectResponse["data"][0][0]["v"].Value<long>().Should().Be(FirstInOrderWidgetId); a.ObjectResponse["data"][0][0]["i"].Value<long>().Should().Be(FirstInOrderWidgetId);
a.ObjectResponse["data"][1][0]["v"].Value<long>().Should().Be(SecondInOrderWidgetId); a.ObjectResponse["data"][1][0]["i"].Value<long>().Should().Be(SecondInOrderWidgetId);
a.ObjectResponse["data"][2][0]["v"].Value<long>().Should().Be(ThirdInOrderWidgetId); a.ObjectResponse["data"][2][0]["i"].Value<long>().Should().Be(ThirdInOrderWidgetId);
a = await Util.DeleteAsync("Widget/" + FirstInOrderWidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in")); a = await Util.DeleteAsync("Widget/" + FirstInOrderWidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
@@ -387,10 +387,10 @@ namespace raven_integration
((JArray)a.ObjectResponse["data"]).Count.Should().Be(4); ((JArray)a.ObjectResponse["data"]).Count.Should().Be(4);
//assert the order returned //assert the order returned
a.ObjectResponse["data"][0][0]["v"].Value<long>().Should().Be(FirstInOrderWidgetId); a.ObjectResponse["data"][0][0]["i"].Value<long>().Should().Be(FirstInOrderWidgetId);
a.ObjectResponse["data"][1][0]["v"].Value<long>().Should().Be(SecondInOrderWidgetId); a.ObjectResponse["data"][1][0]["i"].Value<long>().Should().Be(SecondInOrderWidgetId);
a.ObjectResponse["data"][2][0]["v"].Value<long>().Should().Be(ThirdInOrderWidgetId); a.ObjectResponse["data"][2][0]["i"].Value<long>().Should().Be(ThirdInOrderWidgetId);
a.ObjectResponse["data"][3][0]["v"].Value<long>().Should().Be(FourthInOrderWidgetId); a.ObjectResponse["data"][3][0]["i"].Value<long>().Should().Be(FourthInOrderWidgetId);
a = await Util.DeleteAsync("Widget/" + FirstInOrderWidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in")); a = await Util.DeleteAsync("Widget/" + FirstInOrderWidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));