Template
chore: deploy initial code base
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Strata.ContinuousImprovement.Api.Test.Integration.Tests
|
||||
{
|
||||
[ExcludeFromCodeCoverage]
|
||||
[TestFixture(Category = "Integration")]
|
||||
public class TestUsersController : ApiTestBase
|
||||
{
|
||||
protected const string UsersEndpoint = "api/v1/users";
|
||||
|
||||
[TestCaseSource(nameof(TestUserCases))]
|
||||
public async Task TestUsers(string testName, string url, bool hasCostLeader, bool hasAaronHooper)
|
||||
{
|
||||
// arrange
|
||||
var request = new HttpRequestMessage(HttpMethod.Get, UsersEndpoint + $"/{url}");
|
||||
|
||||
// act
|
||||
var response = await HttpClient.SendAsync(request);
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
// assert
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
response.AssertIsValid();
|
||||
});
|
||||
}
|
||||
|
||||
public static IEnumerable<TestCaseData> TestUserCases()
|
||||
{
|
||||
yield return new TestCaseData("administrators", "administrators", true, false)
|
||||
.SetName("{m} - {0}");
|
||||
yield return new TestCaseData("cost leaders", "cost-leaders", true, false)
|
||||
.SetName("{m} - {0}");
|
||||
yield return new TestCaseData("executive sponsors", "executive-sponsors", true, false)
|
||||
.SetName("{m} - {0}");
|
||||
yield return new TestCaseData("owners", "owners", true, true)
|
||||
.SetName("{m} - {0}");
|
||||
yield return new TestCaseData("users", "users", true, true)
|
||||
.SetName("{m} - {0}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user