This commit is contained in:
@@ -17,7 +17,7 @@ namespace raven_integration
|
|||||||
[Fact]
|
[Fact]
|
||||||
public async void AyaTypeListShouldWork()
|
public async void AyaTypeListShouldWork()
|
||||||
{
|
{
|
||||||
ApiResponse a = await Util.GetAsync("AyaType");
|
ApiResponse a = await Util.GetAsync("AyaType", await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
Util.ValidateHTTPStatusCode(a, 200);
|
Util.ValidateHTTPStatusCode(a, 200);
|
||||||
//there should be at least 8 of them (at time of writing late March 2018)
|
//there should be at least 8 of them (at time of writing late March 2018)
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ namespace raven_integration
|
|||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Fact]
|
[Fact]
|
||||||
public async void TagCRUDProcessingWorks()
|
public async void TagListsWork()
|
||||||
{
|
{
|
||||||
|
|
||||||
var TestName = "TagCRUDProcessingWorks";
|
var TestName = "TagListsWork";
|
||||||
var WidgetRunNameStart = Util.Uniquify(TestName);
|
var WidgetRunNameStart = Util.Uniquify(TestName);
|
||||||
var TagNameStart = Util.Uniquify("crud-tag-test-") + "-";//ensure this run gets it's own unique tags
|
var TagNameStart = Util.Uniquify("crud-tag-test-") + "-";//ensure this run gets it's own unique tags
|
||||||
TagNameStart=TagNameStart.Replace(" ","");
|
TagNameStart=TagNameStart.Replace(" ","");
|
||||||
@@ -65,7 +65,7 @@ namespace raven_integration
|
|||||||
uint ConcurrencyToken = a.ObjectResponse["data"]["concurrencyToken"].Value<uint>();
|
uint ConcurrencyToken = a.ObjectResponse["data"]["concurrencyToken"].Value<uint>();
|
||||||
|
|
||||||
//validate the repository LIST ROUTE of tags contains the ones above
|
//validate the repository LIST ROUTE of tags contains the ones above
|
||||||
a = await Util.GetAsync($"TagPickList/picklist?query={TagNameStart}", await Util.GetTokenAsync("manager", "l3tm3in"));
|
a = await Util.GetAsync($"TagList/picklist?query={TagNameStart}", await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
Util.ValidateHTTPStatusCode(a, 200);
|
Util.ValidateHTTPStatusCode(a, 200);
|
||||||
((JArray)a.ObjectResponse["data"]).Count.Should().Be(7);
|
((JArray)a.ObjectResponse["data"]).Count.Should().Be(7);
|
||||||
@@ -87,28 +87,31 @@ namespace raven_integration
|
|||||||
|
|
||||||
|
|
||||||
//Verify the tags collection remaining
|
//Verify the tags collection remaining
|
||||||
a = await Util.GetAsync($"TagPickList/picklist?query=" + TagNameStart, await Util.GetTokenAsync("manager", "l3tm3in"));
|
a = await Util.GetAsync($"TagList/picklist?query=" + TagNameStart, await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
Util.ValidateHTTPStatusCode(a, 200);
|
Util.ValidateHTTPStatusCode(a, 200);
|
||||||
((JArray)a.ObjectResponse["data"]).Count.Should().Be(9);
|
((JArray)a.ObjectResponse["data"]).Count.Should().Be(9);
|
||||||
|
|
||||||
|
//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);
|
||||||
|
((JArray)a.ObjectResponse["data"]).Count.Should().Be(9);
|
||||||
|
a.ObjectResponse["data"][0]["refCount"].Value<long>().Should().Be(1);
|
||||||
|
|
||||||
//DELETE
|
//DELETE
|
||||||
ApiResponse DELETETestResponse = await Util.DeleteAsync("Widget/" + WidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
|
ApiResponse DELETETestResponse = await Util.DeleteAsync("Widget/" + WidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||||
Util.ValidateHTTPStatusCode(DELETETestResponse, 204);
|
Util.ValidateHTTPStatusCode(DELETETestResponse, 204);
|
||||||
|
|
||||||
//Verify the tags collection remaining
|
//Verify the tags collection remaining
|
||||||
a = await Util.GetAsync($"TagPickList/picklist?query=" + TagNameStart, await Util.GetTokenAsync("manager", "l3tm3in"));
|
a = await Util.GetAsync($"TagList/picklist?query=" + TagNameStart, await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||||
Util.ValidateDataReturnResponseOk(a);
|
Util.ValidateDataReturnResponseOk(a);
|
||||||
Util.ValidateHTTPStatusCode(a, 200);
|
Util.ValidateHTTPStatusCode(a, 200);
|
||||||
((JArray)a.ObjectResponse["data"]).Count.Should().Be(0);
|
((JArray)a.ObjectResponse["data"]).Count.Should().Be(0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//TODO: Deliberate concurrency violation tests here
|
|
||||||
|
|
||||||
|
|
||||||
//==================================================
|
//==================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user