This commit is contained in:
@@ -26,6 +26,7 @@ namespace AyaNova.Biz
|
|||||||
AddField("dollaramount", "WidgetDollarAmount", AyDataType.Decimal).
|
AddField("dollaramount", "WidgetDollarAmount", AyDataType.Decimal).
|
||||||
AddField("active", "WidgetActive", AyDataType.Bool).
|
AddField("active", "WidgetActive", AyDataType.Bool).
|
||||||
AddField("startdate", "WidgetStartDate", AyDataType.Date).
|
AddField("startdate", "WidgetStartDate", AyDataType.Date).
|
||||||
|
AddField("count", "WidgetCount", AyDataType.Integer).
|
||||||
AddField("enddate", "WidgetEndDate", AyDataType.Date);
|
AddField("enddate", "WidgetEndDate", AyDataType.Date);
|
||||||
|
|
||||||
if (localizeToLocaleId != 0)
|
if (localizeToLocaleId != 0)
|
||||||
|
|||||||
@@ -1435,6 +1435,7 @@
|
|||||||
"WidgetName":"Name",
|
"WidgetName":"Name",
|
||||||
"WidgetSerial":"Seriennummer",
|
"WidgetSerial":"Seriennummer",
|
||||||
"WidgetDollarAmount":"Betrag",
|
"WidgetDollarAmount":"Betrag",
|
||||||
|
"WidgetCount":"Anzahl",
|
||||||
"WidgetActive":"Aktiv",
|
"WidgetActive":"Aktiv",
|
||||||
"WidgetRoles":"Rollen",
|
"WidgetRoles":"Rollen",
|
||||||
"WidgetStartDate":"Startdatum",
|
"WidgetStartDate":"Startdatum",
|
||||||
|
|||||||
@@ -1434,6 +1434,7 @@
|
|||||||
"WidgetName":"Name",
|
"WidgetName":"Name",
|
||||||
"WidgetSerial":"Serial #",
|
"WidgetSerial":"Serial #",
|
||||||
"WidgetDollarAmount":"Price",
|
"WidgetDollarAmount":"Price",
|
||||||
|
"WidgetCount":"Count",
|
||||||
"WidgetActive":"Active",
|
"WidgetActive":"Active",
|
||||||
"WidgetRoles":"Roles",
|
"WidgetRoles":"Roles",
|
||||||
"WidgetStartDate":"Start",
|
"WidgetStartDate":"Start",
|
||||||
|
|||||||
@@ -1435,6 +1435,7 @@
|
|||||||
"WidgetName":"Nombre",
|
"WidgetName":"Nombre",
|
||||||
"WidgetSerial":"Número de serie",
|
"WidgetSerial":"Número de serie",
|
||||||
"WidgetDollarAmount":"Importe",
|
"WidgetDollarAmount":"Importe",
|
||||||
|
"WidgetCount":"Recuento",
|
||||||
"WidgetActive":"Activa",
|
"WidgetActive":"Activa",
|
||||||
"WidgetRoles":"Funciones",
|
"WidgetRoles":"Funciones",
|
||||||
"WidgetStartDate":"Fecha de comienzo",
|
"WidgetStartDate":"Fecha de comienzo",
|
||||||
|
|||||||
@@ -1434,6 +1434,7 @@
|
|||||||
"WidgetName":"Nom",
|
"WidgetName":"Nom",
|
||||||
"WidgetSerial":"Numéro de série",
|
"WidgetSerial":"Numéro de série",
|
||||||
"WidgetDollarAmount":"Montant",
|
"WidgetDollarAmount":"Montant",
|
||||||
|
"WidgetCount":"Nombre",
|
||||||
"WidgetActive":"Actif",
|
"WidgetActive":"Actif",
|
||||||
"WidgetRoles":"Rôles",
|
"WidgetRoles":"Rôles",
|
||||||
"WidgetStartDate":"Date de début",
|
"WidgetStartDate":"Date de début",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace AyaNova.Util
|
|||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
|
||||||
private const int DESIRED_SCHEMA_LEVEL = 9;
|
private const int DESIRED_SCHEMA_LEVEL = 9;
|
||||||
|
|
||||||
internal const long EXPECTED_COLUMN_COUNT = 106;
|
internal const long EXPECTED_COLUMN_COUNT = 107;
|
||||||
internal const long EXPECTED_INDEX_COUNT = 24;
|
internal const long EXPECTED_INDEX_COUNT = 24;
|
||||||
|
|
||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ namespace raven_integration
|
|||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
ExcludedWidgetId = a.ObjectResponse["data"]["id"].Value<long>();
|
ExcludedWidgetId = a.ObjectResponse["data"]["id"].Value<long>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//CREATE FILTER
|
//CREATE FILTER
|
||||||
@@ -138,13 +138,11 @@ namespace raven_integration
|
|||||||
|
|
||||||
//inclusive test filter
|
//inclusive test filter
|
||||||
|
|
||||||
HERE
|
dynamic FilterItem = new JObject();
|
||||||
|
FilterItem.fld = "count";
|
||||||
dynamic DataFilterActive = new JObject();
|
FilterItem.op = OpEquality;
|
||||||
DataFilterActive.fld = "active";
|
FilterItem.value = 555;
|
||||||
DataFilterActive.op = OpEquality;
|
dfilter.Add(FilterItem);
|
||||||
DataFilterActive.value = true;
|
|
||||||
dfilter.Add(DataFilterActive);
|
|
||||||
|
|
||||||
d.filter = dfilter.ToString();//it expects it to be a json string, not actual json
|
d.filter = dfilter.ToString();//it expects it to be a json string, not actual json
|
||||||
|
|
||||||
@@ -158,35 +156,30 @@ namespace raven_integration
|
|||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
Util.ValidateHTTPStatusCode(a, 200);
|
Util.ValidateHTTPStatusCode(a, 200);
|
||||||
|
|
||||||
//assert contains at least two records
|
//assert contains at least this test record
|
||||||
((JArray)a.ObjectResponse["data"]).Count.Should().BeGreaterThan(1);
|
((JArray)a.ObjectResponse["data"]).Count.Should().BeGreaterThan(0);
|
||||||
var v = ((JArray)a.ObjectResponse["data"]);
|
var v = ((JArray)a.ObjectResponse["data"]);
|
||||||
List<long> IDInResultList = new List<long>();
|
List<long> IDInResultList = new List<long>();
|
||||||
int nActiveMatches = 0;
|
int InclusiveMatchCount = 0;
|
||||||
int nInactiveMatches = 0;
|
int ExclusiveMatchCount = 0;
|
||||||
foreach (JObject o in v)
|
foreach (JObject o in v)
|
||||||
{
|
{
|
||||||
if (ActiveWidgetIdList.Contains(o["id"].Value<long>()))
|
if (IncludedWidgetId == o["id"].Value<long>())
|
||||||
nActiveMatches++;
|
InclusiveMatchCount++;
|
||||||
if (NotActiveWidgetIdList.Contains(o["id"].Value<long>()))
|
if (ExcludedWidgetId == o["id"].Value<long>())//whups
|
||||||
nInactiveMatches++;
|
ExclusiveMatchCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
nActiveMatches.Should().Be(ActiveWidgetIdList.Count);
|
InclusiveMatchCount.Should().BeGreaterOrEqualTo(1);
|
||||||
nInactiveMatches.Should().Be(0);
|
ExclusiveMatchCount.Should().Be(0);
|
||||||
|
|
||||||
//DELETE WIDGETS
|
//DELETE WIDGETS
|
||||||
foreach (long l in ActiveWidgetIdList)
|
a = await Util.DeleteAsync("Widget/" + IncludedWidgetId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||||
{
|
Util.ValidateHTTPStatusCode(a, 204);
|
||||||
a = await Util.DeleteAsync("Widget/" + l.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
|
||||||
Util.ValidateHTTPStatusCode(a, 204);
|
a = await Util.DeleteAsync("Widget/" + ExcludedWidgetId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||||
}
|
Util.ValidateHTTPStatusCode(a, 204);
|
||||||
|
|
||||||
foreach (long l in NotActiveWidgetIdList)
|
|
||||||
{
|
|
||||||
a = await Util.DeleteAsync("Widget/" + l.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
|
||||||
Util.ValidateHTTPStatusCode(a, 204);
|
|
||||||
}
|
|
||||||
|
|
||||||
//DELETE DATAFILTER
|
//DELETE DATAFILTER
|
||||||
a = await Util.DeleteAsync("DataFilter/" + DataFilterId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
a = await Util.DeleteAsync("DataFilter/" + DataFilterId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||||
|
|||||||
Reference in New Issue
Block a user