This commit is contained in:
2020-05-13 23:35:52 +00:00
parent e08f352b7a
commit b509fc08ce
13 changed files with 337 additions and 337 deletions

View File

@@ -34,7 +34,7 @@ namespace raven_integration
w.usertype = 1;
//*** CREATED
ApiResponse r2 = await Util.PostAsync("Widget", await Util.GetTokenAsync("InventoryFull"), w.ToString());
ApiResponse r2 = await Util.PostAsync("widget", await Util.GetTokenAsync("InventoryFull"), w.ToString());
Util.ValidateDataReturnResponseOk(r2);
long w2Id = r2.ObjectResponse["data"]["id"].Value<long>();
@@ -52,7 +52,7 @@ namespace raven_integration
//*** RETRIEVED
//Get one
ApiResponse r3 = await Util.GetAsync("Widget/" + w2Id.ToString(), await Util.GetTokenAsync("InventoryFull"));
ApiResponse r3 = await Util.GetAsync("widget/" + w2Id.ToString(), await Util.GetTokenAsync("InventoryFull"));
Util.ValidateDataReturnResponseOk(r3);
r3.ObjectResponse["data"]["name"].Value<string>().Should().Be(w.name.ToString());
w = r3.ObjectResponse["data"];
@@ -73,12 +73,12 @@ namespace raven_integration
w.name = Util.Uniquify("UPDATED VIA PUT EVENTLOG TEST WIDGET");
w.UserId = 1;
w.concurrency = r2.ObjectResponse["data"]["concurrency"].Value<uint>();
ApiResponse PUTTestResponse = await Util.PutAsync("Widget", await Util.GetTokenAsync("InventoryFull"), w.ToString());
ApiResponse PUTTestResponse = await Util.PutAsync("widget", await Util.GetTokenAsync("InventoryFull"), w.ToString());
Util.ValidateHTTPStatusCode(PUTTestResponse, 200);
//*** RETRIEVED
//check PUT worked
ApiResponse checkPUTWorked = await Util.GetAsync("Widget/" + w2Id.ToString(), await Util.GetTokenAsync("InventoryFull"));
ApiResponse checkPUTWorked = await Util.GetAsync("widget/" + w2Id.ToString(), await Util.GetTokenAsync("InventoryFull"));
Util.ValidateNoErrorInResponse(checkPUTWorked);
checkPUTWorked.ObjectResponse["data"]["name"].Value<string>().Should().Be(w.name.ToString());
uint concurrency = PUTTestResponse.ObjectResponse["data"]["concurrency"].Value<uint>();
@@ -101,7 +101,7 @@ namespace raven_integration
//DELETE
ApiResponse DELETETestResponse = await Util.DeleteAsync("Widget/" + w2Id.ToString(), await Util.GetTokenAsync("InventoryFull"));
ApiResponse DELETETestResponse = await Util.DeleteAsync("widget/" + w2Id.ToString(), await Util.GetTokenAsync("InventoryFull"));
Util.ValidateHTTPStatusCode(DELETETestResponse, 204);
//All events should be cleared up on deletion with the sole exception of the deleted event
@@ -156,7 +156,7 @@ namespace raven_integration
d.active = true;
d.usertype = 1;
d.notes = "note here";
a = await Util.PostAsync("Widget", await Util.GetTokenAsync(UniqueName, UniqueName), d.ToString());
a = await Util.PostAsync("widget", await Util.GetTokenAsync(UniqueName, UniqueName), d.ToString());
Util.ValidateDataReturnResponseOk(a);
}