diff --git a/api.integrationTests/ApiWappFactory.cs b/api.integrationTests/ApiWappFactory.cs new file mode 100644 index 0000000..077b497 --- /dev/null +++ b/api.integrationTests/ApiWappFactory.cs @@ -0,0 +1,6 @@ +using Microsoft.AspNetCore.Mvc.Testing; + +namespace api.integrationTests; + +internal class ApiWappFactory : WebApplicationFactory +{} \ No newline at end of file diff --git a/api.integrationTests/AssignmentTest.cs b/api.integrationTests/AssignmentTest.cs new file mode 100644 index 0000000..cce00fe --- /dev/null +++ b/api.integrationTests/AssignmentTest.cs @@ -0,0 +1,20 @@ +using System.Net.Http.Json; + +namespace api.integrationTests; + +public class AssignmentTest +{ + [Fact] + public async void List() + { + var application = new ApiWappFactory(); + var client = application.CreateClient(); + + var response = await client.GetAsync("Assignment/List"); + response.EnsureSuccessStatusCode(); + + var responseData = await response.Content.ReadFromJsonAsync(); + Assert.NotNull(responseData); + Assert.Single(responseData); + } +} \ No newline at end of file diff --git a/api.integrationTests/UnitTest1.cs b/api.integrationTests/UnitTest1.cs deleted file mode 100644 index d14fbc6..0000000 --- a/api.integrationTests/UnitTest1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace api.integrationTests; - -public class UnitTest1 -{ - [Fact] - public void Test1() - { - - } -} \ No newline at end of file