This commit is contained in:
@@ -4622,11 +4622,21 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
// foreach (JObject o in v)
|
||||
// {
|
||||
// if (InclusiveWidgetIdList.Contains(o["id"].Value<long>()))
|
||||
// InclusiveMatchCount++;
|
||||
// if (ExclusiveWidgetIdList.Contains(o["id"].Value<long>()))
|
||||
// ExclusiveMatchCount++;
|
||||
// }
|
||||
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (InclusiveWidgetIdList.Contains(o["id"].Value<long>()))
|
||||
JObject o = ja[0] as JObject;
|
||||
|
||||
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>()))
|
||||
InclusiveMatchCount++;
|
||||
if (ExclusiveWidgetIdList.Contains(o["id"].Value<long>()))
|
||||
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>()))
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -5970,11 +5980,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -6072,11 +6083,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -6174,11 +6186,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -6278,11 +6291,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -6381,11 +6395,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -6485,11 +6500,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -6850,7 +6866,7 @@ same as the server does but in a central location here for all tests to use.
|
||||
//inclusive test filter
|
||||
|
||||
dynamic FilterItem = new JObject();
|
||||
FilterItem.fld = "dollaramount";
|
||||
FilterItem.fld = "widgetdollaramount";
|
||||
FilterItem.op = Util.OpEquality;
|
||||
FilterItem.value = 5.55;
|
||||
dfilter.Add(FilterItem);
|
||||
@@ -6873,11 +6889,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -6952,7 +6969,7 @@ same as the server does but in a central location here for all tests to use.
|
||||
//inclusive test filter
|
||||
|
||||
dynamic FilterItem = new JObject();
|
||||
FilterItem.fld = "dollaramount";
|
||||
FilterItem.fld = "widgetdollaramount";
|
||||
FilterItem.op = Util.OpGreaterThan;
|
||||
FilterItem.value = 54.44;
|
||||
dfilter.Add(FilterItem);
|
||||
@@ -6975,11 +6992,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -7054,7 +7072,7 @@ same as the server does but in a central location here for all tests to use.
|
||||
//inclusive test filter
|
||||
|
||||
dynamic FilterItem = new JObject();
|
||||
FilterItem.fld = "dollaramount";
|
||||
FilterItem.fld = "widgetdollaramount";
|
||||
FilterItem.op = Util.OpGreaterThanOrEqualTo;
|
||||
FilterItem.value = 555.55;
|
||||
dfilter.Add(FilterItem);
|
||||
@@ -7077,11 +7095,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -7158,7 +7177,7 @@ same as the server does but in a central location here for all tests to use.
|
||||
//inclusive test filter
|
||||
|
||||
dynamic FilterItem = new JObject();
|
||||
FilterItem.fld = "dollaramount";
|
||||
FilterItem.fld = "widgetdollaramount";
|
||||
FilterItem.op = Util.OpLessThan;
|
||||
FilterItem.value = 5555.55;
|
||||
dfilter.Add(FilterItem);
|
||||
@@ -7181,11 +7200,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -7261,7 +7281,7 @@ same as the server does but in a central location here for all tests to use.
|
||||
//inclusive test filter
|
||||
|
||||
dynamic FilterItem = new JObject();
|
||||
FilterItem.fld = "dollaramount";
|
||||
FilterItem.fld = "widgetdollaramount";
|
||||
FilterItem.op = Util.OpLessThanOrEqualTo;
|
||||
FilterItem.value = -444.44;
|
||||
dfilter.Add(FilterItem);
|
||||
@@ -7284,11 +7304,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -7365,7 +7386,7 @@ same as the server does but in a central location here for all tests to use.
|
||||
//inclusive test filter
|
||||
|
||||
dynamic FilterItem = new JObject();
|
||||
FilterItem.fld = "dollaramount";
|
||||
FilterItem.fld = "widgetdollaramount";
|
||||
FilterItem.op = Util.OpNotEqual;
|
||||
FilterItem.value = 223.23;
|
||||
dfilter.Add(FilterItem);
|
||||
@@ -7388,11 +7409,12 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (IncludedWidgetId == o["id"].Value<long>())
|
||||
JObject o = ja[0] as JObject;
|
||||
if (IncludedWidgetId == o["v"].Value<long>())
|
||||
InclusiveMatchCount++;
|
||||
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||
if (ExcludedWidgetId == o["v"].Value<long>())
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
@@ -7508,7 +7530,7 @@ same as the server does but in a central location here for all tests to use.
|
||||
|
||||
//active test filter
|
||||
dynamic DataFilterActive = new JObject();
|
||||
DataFilterActive.fld = "tags";
|
||||
DataFilterActive.fld = "widgettags";
|
||||
DataFilterActive.op = Util.OpEquality;
|
||||
dynamic FilterTagsArray = new JArray();
|
||||
FilterTagsArray.Add("red-tag-test");
|
||||
@@ -7535,14 +7557,28 @@ same as the server does but in a central location here for all tests to use.
|
||||
List<long> IDInResultList = new List<long>();
|
||||
int InclusiveMatchCount = 0;
|
||||
int ExclusiveMatchCount = 0;
|
||||
foreach (JObject o in v)
|
||||
|
||||
|
||||
// foreach (JObject o in v)
|
||||
// {
|
||||
// if (InclusiveWidgetIdList.Contains(o["id"].Value<long>()))
|
||||
// InclusiveMatchCount++;
|
||||
// if (ExclusiveWidgetIdList.Contains(o["id"].Value<long>()))
|
||||
// ExclusiveMatchCount++;
|
||||
// }
|
||||
|
||||
foreach (JArray ja in v)
|
||||
{
|
||||
if (InclusiveWidgetIdList.Contains(o["id"].Value<long>()))
|
||||
JObject o = ja[0] as JObject;
|
||||
|
||||
if (InclusiveWidgetIdList.Contains(o["v"].Value<long>()))
|
||||
InclusiveMatchCount++;
|
||||
if (ExclusiveWidgetIdList.Contains(o["id"].Value<long>()))
|
||||
if (ExclusiveWidgetIdList.Contains(o["v"].Value<long>()))
|
||||
ExclusiveMatchCount++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
InclusiveMatchCount.Should().Be(InclusiveWidgetIdList.Count);
|
||||
ExclusiveMatchCount.Should().Be(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user