diff --git a/DataList/DataListFiltering.cs b/DataList/DataListFiltering.cs index c6377e6..8a329b0 100644 --- a/DataList/DataListFiltering.cs +++ b/DataList/DataListFiltering.cs @@ -103,6 +103,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.startDate = new DateTime(1968, 3, 12, 10, 0, 0).ToOffsetAdjustedUniversalTime(); w.endDate = new DateTime(1968, 3, 12, 11, 0, 0).ToOffsetAdjustedUniversalTime(); + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -214,6 +215,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.startDate = new DateTime(1970, 3, 12, 10, 0, 0).ToOffsetAdjustedUniversalTime(); w.endDate = new DateTime(1970, 3, 12, 11, 0, 0).ToOffsetAdjustedUniversalTime(); + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -325,6 +327,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.startDate = new DateTime(1970, 3, 12, 10, 0, 0).ToOffsetAdjustedUniversalTime(); w.endDate = new DateTime(1970, 3, 12, 11, 0, 0).ToOffsetAdjustedUniversalTime(); + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -435,6 +438,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.startDate = new DateTime(1970, 3, 12, 10, 0, 0).ToOffsetAdjustedUniversalTime(); w.endDate = new DateTime(1970, 3, 12, 11, 0, 0).ToOffsetAdjustedUniversalTime(); + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -539,6 +543,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.startDate = new DateTime(1970, 3, 12, 10, 0, 0).ToOffsetAdjustedUniversalTime(); w.endDate = new DateTime(1970, 3, 12, 11, 0, 0).ToOffsetAdjustedUniversalTime(); + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -643,6 +648,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.startDate = new DateTime(1970, 3, 12, 10, 0, 0).ToOffsetAdjustedUniversalTime(); w.endDate = new DateTime(1970, 3, 12, 11, 0, 0).ToOffsetAdjustedUniversalTime(); + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -726,7 +732,7 @@ same as the server does but in a central location here for all tests to use. - /// + /// /// /// [Fact] @@ -747,6 +753,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.startDate = new DateTime(2019, 3, 12, 10, 0, 0).ToOffsetAdjustedUniversalTime(); w.endDate = new DateTime(2019, 3, 12, 11, 0, 0).ToOffsetAdjustedUniversalTime(); + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -784,7 +791,7 @@ same as the server does but in a central location here for all tests to use. FilterItem.value = new DateTime(2019, 3, 12, 10, 0, 0).ToOffsetAdjustedUniversalTime(); dfilter.Add(FilterItem); - + dynamic FilterItem2 = new JObject(); FilterItem2.fld = "widgetstartdate"; FilterItem2.op = Util.OpLessThanOrEqualTo; @@ -878,7 +885,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "aardvark"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -1004,7 +1011,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "O'Flaherty's pub"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -1127,7 +1134,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "Bill & Ted's excellent adventure"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -1260,7 +1267,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = InclusiveTestString; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -1384,7 +1391,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "Alabama"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -1508,7 +1515,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "Bjorn"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -1632,7 +1639,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "California"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -1756,7 +1763,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "Donut"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -1879,7 +1886,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "Egg Salad Sandwich"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -2002,7 +2009,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "Gray poupon"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -2125,7 +2132,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "Fast Freddy Freak"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -2248,7 +2255,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "Granular"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -2372,7 +2379,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "Bo Horvat"; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -2509,7 +2516,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.active = true; - w.roles = 0; + w.usertype = 1; w.count = 5; w.notes = "blah"; w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); @@ -2613,7 +2620,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; w.count = 55; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); @@ -2716,7 +2723,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; w.count = 555; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); @@ -2821,7 +2828,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; w.count = -5555; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); @@ -2925,7 +2932,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; w.count = -444; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); @@ -3030,7 +3037,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; w.count = 222; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); @@ -3146,7 +3153,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -3280,7 +3287,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -3420,7 +3427,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; w.dollarAmount = 5.55; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); @@ -3522,7 +3529,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; w.dollarAmount = 55.55; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); @@ -3625,7 +3632,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; w.dollarAmount = 555.55; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); @@ -3730,7 +3737,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; w.dollarAmount = -5555.55; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); @@ -3834,7 +3841,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; w.dollarAmount = -444.44; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); @@ -3939,7 +3946,7 @@ same as the server does but in a central location here for all tests to use. w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.active = true; - w.roles = 0; + w.usertype = 1; w.dollarAmount = 222.22; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); @@ -4049,6 +4056,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; + w.usertype = 1; //Tags dynamic InclusiveTagsArray = new JArray(); InclusiveTagsArray.Add("red-tag-test"); @@ -4209,6 +4217,7 @@ same as the server does but in a central location here for all tests to use. w.name = Util.Uniquify(WidgetRunNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; + w.usertype = 1; //Tags dynamic InclusiveTagsArray = new JArray(); InclusiveTagsArray.Add("red-tag-test"); diff --git a/DataList/DataListSorting.cs b/DataList/DataListSorting.cs index e19b2a6..d827883 100644 --- a/DataList/DataListSorting.cs +++ b/DataList/DataListSorting.cs @@ -30,6 +30,7 @@ namespace raven_integration w.name = Util.Uniquify(WidgetNameStart); w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); ThirdInOrderWidgetId = a.ObjectResponse["data"]["id"].Value(); @@ -122,6 +123,7 @@ namespace raven_integration w.notes = "blah"; w.startDate = DateTime.Now; w.endDate = DateTime.Now.AddHours(1); + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -227,6 +229,7 @@ namespace raven_integration w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w.notes = "blah"; w.count = 999; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -351,6 +354,7 @@ namespace raven_integration w.notes = "blah"; w.dollaramount = 2.22; w.count = 1; + w.usertype = 1; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w.ToString()); Util.ValidateDataReturnResponseOk(a); diff --git a/EventLog/EventLog.cs b/EventLog/EventLog.cs index 4ee9ae7..d787ea9 100644 --- a/EventLog/EventLog.cs +++ b/EventLog/EventLog.cs @@ -31,7 +31,7 @@ namespace raven_integration w.created = DateTime.Now.ToString(); w.dollarAmount = 2.22m; w.active = true; - w.roles = 0; + w.usertype = 1; ApiResponse r2 = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), w.ToString()); Util.ValidateDataReturnResponseOk(r2); diff --git a/Search/SearchOps.cs b/Search/SearchOps.cs index 1a6b5bd..5ea81bd 100644 --- a/Search/SearchOps.cs +++ b/Search/SearchOps.cs @@ -23,7 +23,7 @@ namespace raven_integration D.customFields = Util.WidgetRequiredCustomFieldsJsonString(); D.dollarAmount = 1.11m; D.active = true; - D.roles = 0; + D.usertype = 1; D.notes = "This record will match in notes: The quick brown and simple fox jumped over the six lazy dogs!"; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString()); @@ -39,7 +39,7 @@ namespace raven_integration D.active = true; D.login = Util.Uniquify("LOGIN"); D.password = Util.Uniquify("PASSWORD"); - D.roles = 0;//norole + D.usertype = 1; D.localeId = 1;//random locale D.userType = 3;//non scheduleable @@ -56,7 +56,7 @@ namespace raven_integration D.active = true; D.login = Util.Uniquify("LOGIN"); D.password = Util.Uniquify("PASSWORD"); - D.roles = 0;//norole + D.usertype = 1; D.localeId = 1;//random locale D.userType = 3;//non scheduleable @@ -70,7 +70,7 @@ namespace raven_integration D.customFields = Util.WidgetRequiredCustomFieldsJsonString(); D.dollarAmount = 1.11m; D.active = true; - D.roles = 0; + D.usertype = 1; D.notes = "This Widget matches in name"; a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString()); @@ -83,7 +83,7 @@ namespace raven_integration D.customFields = Util.WidgetRequiredCustomFieldsJsonString(); D.dollarAmount = 1.11m; D.active = true; - D.roles = 0; + D.usertype = 1; D.notes = "This Widget should not be returned in the search as it only contains a single keyword in the name not both"; a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString()); @@ -177,7 +177,7 @@ namespace raven_integration D.customFields = Util.WidgetRequiredCustomFieldsJsonString(); D.dollarAmount = 1.11m; D.active = true; - D.roles = 0; + D.usertype = 1; D.notes = "This record will match in notes: The quick brown and hapless goose"; @@ -193,7 +193,7 @@ namespace raven_integration D.active = true; D.login = Util.Uniquify("LOGIN"); D.password = Util.Uniquify("PASSWORD"); - D.roles = 0;//norole + D.usertype = 1; D.localeId = 1;//random locale D.userType = 3;//non scheduleable D.customFields = Util.UserRequiredCustomFieldsJsonString(); @@ -242,7 +242,7 @@ namespace raven_integration D.customFields = Util.WidgetRequiredCustomFieldsJsonString(); D.dollarAmount = 1.11m; D.active = true; - D.roles = 0; + D.usertype = 1; D.notes = "This record will match in notes: react to the goose"; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString()); @@ -257,7 +257,7 @@ namespace raven_integration D.active = true; D.login = Util.Uniquify("LOGIN"); D.password = Util.Uniquify("PASSWORD"); - D.roles = 0;//norole + D.usertype = 1; D.localeId = 1;//random locale D.userType = 3;//non scheduleable D.customFields = Util.UserRequiredCustomFieldsJsonString(); @@ -308,7 +308,7 @@ namespace raven_integration D.customFields = Util.WidgetRequiredCustomFieldsJsonString(); D.dollarAmount = 1.11m; D.active = true; - D.roles = 0; + D.usertype = 1; D.notes = "This record will match in notes: broadcasting to the goose"; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString()); @@ -323,7 +323,7 @@ namespace raven_integration D.active = true; D.login = Util.Uniquify("LOGIN"); D.password = Util.Uniquify("PASSWORD"); - D.roles = 0;//norole + D.usertype = 1; D.localeId = 1;//random locale D.userType = 3;//non scheduleable D.customFields = Util.UserRequiredCustomFieldsJsonString(); @@ -387,7 +387,7 @@ namespace raven_integration D.customFields = Util.WidgetRequiredCustomFieldsJsonString(); D.dollarAmount = 1.11m; D.active = true; - D.roles = 0; + D.usertype = 1; D.notes = "This record will match in notes and tag: elementary my dear aardvark"; D.tags = TagsArray; @@ -404,7 +404,7 @@ namespace raven_integration D.customFields = Util.WidgetRequiredCustomFieldsJsonString(); D.dollarAmount = 1.11m; D.active = true; - D.roles = 0; + D.usertype = 1; D.notes = "This record will match in tag but no search phrase"; D.tags = TagsArray; @@ -422,7 +422,7 @@ namespace raven_integration D.active = true; D.login = Util.Uniquify("LOGIN"); D.password = Util.Uniquify("PASSWORD"); - D.roles = 0;//norole + D.usertype = 1; D.localeId = 1;//random locale D.userType = 3;//non scheduleable D.customFields = Util.UserRequiredCustomFieldsJsonString(); @@ -549,7 +549,7 @@ namespace raven_integration D.customFields = Util.WidgetRequiredCustomFieldsJsonString(); D.dollarAmount = 1.11m; D.active = true; - D.roles = 0; + D.usertype = 1; D.notes = "Test for serial number search"; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString()); @@ -628,7 +628,7 @@ Likely fix is to force order to most recent or simply to delete after test so th D.customFields = dCustomField.ToString(); D.dollarAmount = 1.11m; D.active = true; - D.roles = 0; + D.usertype = 1; D.notes = "This record will match in custom field"; ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString()); diff --git a/Tags/TagOps.cs b/Tags/TagOps.cs index fae4316..f6362a4 100644 --- a/Tags/TagOps.cs +++ b/Tags/TagOps.cs @@ -20,7 +20,7 @@ namespace raven_integration var TestName = "TagListsWork"; var WidgetRunNameStart = Util.Uniquify(TestName); var TagNameStart = Util.Uniquify("crud-tag-test-") + "-";//ensure this run gets it's own unique tags - TagNameStart=TagNameStart.Replace(" ",""); + TagNameStart = TagNameStart.Replace(" ", ""); List InitialTagsList = new List(); InitialTagsList.Add(TagNameStart + "red"); @@ -51,8 +51,9 @@ namespace raven_integration dynamic w = new JObject(); w.name = Util.Uniquify(WidgetRunNameStart); - w.notes="blah"; + w.notes = "blah"; w.customFields = Util.WidgetRequiredCustomFieldsJsonString(); + w.usertype = 1; //Tags dynamic InitialTags = new JArray(); foreach (string s in InitialTagsList) @@ -94,7 +95,7 @@ namespace raven_integration Util.ValidateHTTPStatusCode(a, 200); ((JArray)a.ObjectResponse["data"]).Count.Should().Be(9); - //Verify the CLOUD LIST AND REF COUNT of tags collection remaining + //Verify the CLOUD LIST AND REF COUNT of tags collection remaining a = await Util.GetAsync($"TagList/cloudlist?query=" + TagNameStart, await Util.GetTokenAsync("manager", "l3tm3in")); Util.ValidateDataReturnResponseOk(a); Util.ValidateHTTPStatusCode(a, 200); diff --git a/Widget/WidgetCrud.cs b/Widget/WidgetCrud.cs index 7f29f73..56a7669 100644 --- a/Widget/WidgetCrud.cs +++ b/Widget/WidgetCrud.cs @@ -29,7 +29,7 @@ namespace raven_integration w1.name = Util.Uniquify("First Test WIDGET"); w1.dollarAmount = 1.11m; w1.active = true; - w1.roles = 0; + w1.usertype = 1; w1.notes = "The quick brown fox jumped over the six lazy dogs!"; w1.customFields = Util.WidgetRequiredCustomFieldsJsonString(); @@ -52,7 +52,7 @@ namespace raven_integration w2.name = Util.Uniquify("Second Test WIDGET"); w2.dollarAmount = 2.22m; w2.active = true; - w2.roles = 0; + w2.usertype = 1; w2.notes = "What is the frequency Kenneth?"; w2.tags = dTagsArray; w2.customFields = Util.WidgetRequiredCustomFieldsJsonString(); @@ -184,7 +184,7 @@ namespace raven_integration w2.name = Util.Uniquify("PutConcurrencyViolationShouldFail"); w2.dollarAmount = 2.22m; w2.active = true; - w2.roles = 0; + w2.usertype = 1; w2.notes="blah"; w2.customFields = Util.WidgetRequiredCustomFieldsJsonString(); @@ -227,7 +227,7 @@ namespace raven_integration w2.customFields = Util.WidgetRequiredCustomFieldsJsonString(); w2.dollarAmount = 2.22m; w2.active = true; - w2.roles = 0; + w2.usertype = 1; w2.customFields = Util.WidgetRequiredCustomFieldsJsonString(); ApiResponse r2 = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w2.ToString()); diff --git a/Widget/WidgetRights.cs b/Widget/WidgetRights.cs index 6b7ce93..97c9ada 100644 --- a/Widget/WidgetRights.cs +++ b/Widget/WidgetRights.cs @@ -47,7 +47,7 @@ namespace raven_integration d.created = DateTime.Now.ToString(); d.dollarAmount = 1.11m; d.active = true; - d.roles = 0; + d.usertype = 1; //BizAdminLimited user should not be able to create a widget, only read them ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync( "BizAdminLimited"), d.ToString()); diff --git a/Widget/WidgetValidationTests.cs b/Widget/WidgetValidationTests.cs index 76740f4..5f7b856 100644 --- a/Widget/WidgetValidationTests.cs +++ b/Widget/WidgetValidationTests.cs @@ -23,7 +23,7 @@ namespace raven_integration // d.created = DateTime.Now.ToString(); // d.dollarAmount = 1.11m; // d.active = false;//<--- BROKEN RULE new widget must be active = true!! - // d.roles = 0; + // d.usertype = 1; // //create via inventory full test user // ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), d.ToString()); @@ -50,7 +50,7 @@ namespace raven_integration d.created = DateTime.Now.ToString(); d.dollarAmount = 1.11m; d.active = true; - d.roles = 0; + d.usertype = 1; //create via inventory full test user ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), d.ToString()); @@ -79,7 +79,7 @@ namespace raven_integration d.created = DateTime.Now.ToString(); d.dollarAmount = 1.11m; d.active = true; - d.roles = 0; + d.usertype = 1; //create via inventory full test user ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), d.ToString()); @@ -105,7 +105,7 @@ namespace raven_integration d.created = DateTime.Now.ToString(); d.dollarAmount = 1.11m; d.active = true; - d.roles = 0; + d.usertype = 1; //create via inventory full test user ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), d.ToString()); @@ -134,7 +134,7 @@ namespace raven_integration //NO END DATE ERRROR d.dollarAmount = 1.11m; d.active = true; - d.roles = 0; + d.usertype = 1; //create via inventory full test user ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), d.ToString()); @@ -162,7 +162,7 @@ namespace raven_integration //NO START DATE ERRROR d.dollarAmount = 1.11m; d.active = true; - d.roles = 0; + d.usertype = 1; //create via inventory full test user ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), d.ToString()); @@ -190,7 +190,7 @@ namespace raven_integration //NO START DATE ERRROR d.dollarAmount = 1.11m; d.active = true; - d.roles = 0; + d.usertype = 1; //create via inventory full test user ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), d.ToString()); @@ -210,9 +210,6 @@ namespace raven_integration [Fact] public async void BusinessRuleEnumInvalidShouldError() { - //Note: because of the way the flags work as powers of 2 and with the 1 being the first flag value, basically any value up to the "All" value will be valid - //because you can make any number from 0 to all using any combination of the flags so the only thing that will fail is less than zero or greater than All - //As of this last edit the total flags value of All for roles is 131071 dynamic d = new JObject(); d.name = Util.Uniquify("BusinessRuleEnumInvalidShouldError TEST"); @@ -221,7 +218,7 @@ namespace raven_integration //NO END DATE ERRROR d.dollarAmount = 1.11m; d.active = true; - d.roles = -1;//<---BAD ROLE VALUE + d.usertype = -1;//<---BAD VALUE d.Notes = "blah"; d.customFields = Util.WidgetRequiredCustomFieldsJsonString(); @@ -232,7 +229,7 @@ namespace raven_integration //2002 in-valid expected Util.ValidateErrorCodeResponse(a, 2200, 400); - Util.ShouldContainValidationError(a, "Roles", "2203"); + Util.ShouldContainValidationError(a, "UserType", "2203"); }