4648
This commit is contained in:
@@ -1,45 +1,45 @@
|
||||
using System;
|
||||
using Xunit;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using FluentAssertions;
|
||||
|
||||
namespace raven_integration
|
||||
{
|
||||
|
||||
public class EnumListOps
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async void GetListOfEnumListsAndGetAllEnumListsWorks()
|
||||
{
|
||||
ApiResponse a = await Util.GetAsync("enum-list/listkeys", await Util.GetTokenAsync("superuser", "l3tm3in"));
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
Util.ValidateHTTPStatusCode(a, 200);
|
||||
((JArray)a.ObjectResponse["data"]).Count.Should().BeGreaterThan(2);
|
||||
|
||||
//iterate all the list names and fetch each one in turn and see that it fetches ok and has at least 2 list items in it
|
||||
foreach (JObject jListName in a.ObjectResponse["data"])
|
||||
{
|
||||
|
||||
ApiResponse b = await Util.GetAsync($"enum-list/list/{jListName["key"].Value<string>()}", await Util.GetTokenAsync("superuser", "l3tm3in"));
|
||||
Util.ValidateDataReturnResponseOk(b);
|
||||
Util.ValidateHTTPStatusCode(b, 200);
|
||||
((JArray)b.ObjectResponse["data"]).Count.Should().BeGreaterThan(1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//==================================================
|
||||
|
||||
}//eoc
|
||||
}//eons
|
||||
using System;
|
||||
using Xunit;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using FluentAssertions;
|
||||
|
||||
namespace raven_integration
|
||||
{
|
||||
|
||||
public class EnumListOps
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task GetListOfEnumListsAndGetAllEnumListsWorks()
|
||||
{
|
||||
ApiResponse a = await Util.GetAsync("enum-list/listkeys", await Util.GetTokenAsync("superuser", "l3tm3in"));
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
Util.ValidateHTTPStatusCode(a, 200);
|
||||
((JArray)a.ObjectResponse["data"]).Count.Should().BeGreaterThan(2);
|
||||
|
||||
//iterate all the list names and fetch each one in turn and see that it fetches ok and has at least 2 list items in it
|
||||
foreach (JObject jListName in a.ObjectResponse["data"])
|
||||
{
|
||||
|
||||
ApiResponse b = await Util.GetAsync($"enum-list/list/{jListName["key"].Value<string>()}", await Util.GetTokenAsync("superuser", "l3tm3in"));
|
||||
Util.ValidateDataReturnResponseOk(b);
|
||||
Util.ValidateHTTPStatusCode(b, 200);
|
||||
((JArray)b.ObjectResponse["data"]).Count.Should().BeGreaterThan(1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//==================================================
|
||||
|
||||
}//eoc
|
||||
}//eons
|
||||
|
||||
Reference in New Issue
Block a user