This commit is contained in:
2020-02-11 18:29:21 +00:00
parent 51f185f07b
commit dd484aed3a
8 changed files with 77 additions and 66 deletions

View File

@@ -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");
}