diff --git a/DataList/DataListFiltering.cs b/DataList/DataListFiltering.cs index 88c340f..8a80d8e 100644 --- a/DataList/DataListFiltering.cs +++ b/DataList/DataListFiltering.cs @@ -3986,116 +3986,6 @@ same as the server does but in a central location here for all tests to use. } } - // /// - // /// - // /// - // [Fact] - // public async void BoolOpNotEqualFilterWorks() - // { - - // //OPS: equal to, not equal to - // //values: true, false - - // var WidgetNameStart = "BoolDataFilterTest"; - - // List ActiveWidgetIdList = new List(); - // List NotActiveWidgetIdList = new List(); - - // //CREATE 4 TEST WIDGETS - // //two active and two non active - - // //first active widget - // dynamic w = new JObject(); - // w.name = Util.Uniquify(WidgetNameStart); - // w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); - // w.notes = "blah"; - // w.active = true; - // w.usertype = 1; - - // ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); - // Util.ValidateDataReturnResponseOk(a); - // ActiveWidgetIdList.Add(a.ObjectResponse["data"]["id"].Value()); - - // //second active widget - // w.name = Util.Uniquify(WidgetNameStart); - - // a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); - // Util.ValidateDataReturnResponseOk(a); - // ActiveWidgetIdList.Add(a.ObjectResponse["data"]["id"].Value()); - - - // //first NON active widget - // w.name = Util.Uniquify(WidgetNameStart); - // w.active = false; - - // a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); - // Util.ValidateDataReturnResponseOk(a); - // NotActiveWidgetIdList.Add(a.ObjectResponse["data"]["id"].Value()); - - // //second NON active widget - // w.name = Util.Uniquify(WidgetNameStart); - // w.active = false; - - // a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); - // Util.ValidateDataReturnResponseOk(a); - // NotActiveWidgetIdList.Add(a.ObjectResponse["data"]["id"].Value()); - - - // //CREATE LISTVIEW - // dynamic dListView = new JArray(); - - // //name starts with filter to constrict to widgets that this test block created only - // dListView.Add(Util.BuildSimpleFilterDataListViewColumn("widgetname", Util.OpStartsWith, WidgetNameStart)); - - // //FILTER - // // dynamic DataFilterActive = new JObject(); - // // DataFilterActive.fld = "widgetactive"; - // // DataFilterActive.op = Util.OpNotEqual; - // // DataFilterActive.value = true; - // dListView.Add(Util.BuildSimpleFilterDataListViewColumn("widgetactive", Util.OpNotEqual, true)); - - - - // //FETCH DATALIST - // a = await Util.PostAsync($"DataList", await Util.GetTokenAsync("manager", "l3tm3in"), Util.BuildDataListRequestEx(dListView)); - // Util.ValidateDataReturnResponseOk(a); - // Util.ValidateHTTPStatusCode(a, 200); - - // //assert contains at least two records - // ((JArray)a.ObjectResponse["data"]).Count.Should().BeGreaterThan(1); - // var v = ((JArray)a.ObjectResponse["data"]); - // List IDInResultList = new List(); - // int nActiveMatches = 0; - // int nInactiveMatches = 0; - - // foreach (JArray ja in v) - // { - // JObject o = ja[0] as JObject; - - // if (ActiveWidgetIdList.Contains(o["i"].Value())) - // nActiveMatches++; - // if (NotActiveWidgetIdList.Contains(o["i"].Value())) - // nInactiveMatches++; - // } - - // nInactiveMatches.Should().Be(NotActiveWidgetIdList.Count); - // nActiveMatches.Should().Be(0); - - // //DELETE WIDGETS - // foreach (long l in ActiveWidgetIdList) - // { - // a = await Util.DeleteAsync("Widget/" + l.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); - // } - - - // } #endregion *NULL* tests