From 736f6defcd4bb61f23a6e133a588d2bda34e25ae Mon Sep 17 00:00:00 2001 From: andrealouisestanderen Date: Fri, 20 Oct 2023 15:26:19 +0200 Subject: [PATCH] dotnet format --- .../Controllers/ResourceAdmController/IndexTests.cs | 2 +- .../ResourceAdminController/AddResourceTests.cs | 2 +- .../GetAltinn2LinkServicesTests.cs | 2 +- .../ResourceAdminController/GetGetLosTermsTests.cs | 2 +- .../GetPublishStatusByIdTests.cs | 2 +- .../GetRepositoryResourceListTests.cs | 4 ++-- .../ResourceAdminController/GetRepositoryTests.cs | 4 ++-- .../ResourceAdminController/GetResourceByIdTests.cs | 10 +++++----- .../ResourceAdminController/GetSectorsTests.cs | 2 +- .../GetValidateResourceTests.cs | 8 ++++---- .../ResourceAdminController/ImportResourceTests.cs | 2 +- .../ResourceAdminController/UpdateResourceTests.cs | 2 +- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdmController/IndexTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdmController/IndexTests.cs index 940f7507eec..efe2e80ed16 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdmController/IndexTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdmController/IndexTests.cs @@ -20,7 +20,7 @@ public async Task GetResourceAdmIndexOK() string uri = $"/resourceadm/ttd/resources"; using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); string contenthtml = await res.Content.ReadAsStringAsync(); // Assert diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/AddResourceTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/AddResourceTests.cs index 5356586de8e..184b9077f23 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/AddResourceTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/AddResourceTests.cs @@ -48,7 +48,7 @@ public async Task AddServiceResource_StatusCreated() httpRequestMessage.Content = new StringContent(JsonConvert.SerializeObject(serviceResource), System.Text.Encoding.UTF8, "application/json"); //Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); //Assert RepositoryMock.VerifyAll(); diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetAltinn2LinkServicesTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetAltinn2LinkServicesTests.cs index 12f798cb039..dcaed9c796d 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetAltinn2LinkServicesTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetAltinn2LinkServicesTests.cs @@ -40,7 +40,7 @@ public async Task GetFilteredLinkServices() Altinn2MetadataClientMock.Setup(r => r.AvailableServices(It.IsAny(), It.IsAny())).ReturnsAsync(services); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.OK, res.StatusCode); diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetGetLosTermsTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetGetLosTermsTests.cs index a6486102114..23096f819da 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetGetLosTermsTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetGetLosTermsTests.cs @@ -23,7 +23,7 @@ public async Task GetLosTerms() using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); //Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); string sectorscontent = await res.Content.ReadAsStringAsync(); List losTerms = System.Text.Json.JsonSerializer.Deserialize>(sectorscontent, new System.Text.Json.JsonSerializerOptions() { PropertyNamingPolicy = System.Text.Json.JsonNamingPolicy.CamelCase }); diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetPublishStatusByIdTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetPublishStatusByIdTests.cs index 0654a0674ec..c2160c00612 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetPublishStatusByIdTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetPublishStatusByIdTests.cs @@ -47,7 +47,7 @@ public async Task GetResourceStatusById_Passing_Repository_OK() using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.OK, res.StatusCode); diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetRepositoryResourceListTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetRepositoryResourceListTests.cs index a0d920b0b95..a67134a6cc5 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetRepositoryResourceListTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetRepositoryResourceListTests.cs @@ -49,7 +49,7 @@ public async Task GetResourceList_OK() using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.OK, res.StatusCode); @@ -67,7 +67,7 @@ public async Task GetResourceList_NoContent() .Returns(new List()); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.NoContent, res.StatusCode); diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetRepositoryTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetRepositoryTests.cs index 3f9f8d751d0..add0d3ba13c 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetRepositoryTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetRepositoryTests.cs @@ -20,7 +20,7 @@ public async Task GetResourceRepository_OK() using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.OK, res.StatusCode); @@ -35,7 +35,7 @@ public async Task GetResourceRepository_NoContent() using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.NoContent, res.StatusCode); diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetResourceByIdTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetResourceByIdTests.cs index e39089abaa2..531b079b714 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetResourceByIdTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetResourceByIdTests.cs @@ -47,7 +47,7 @@ public async Task GetResourceById_OK() using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.OK, res.StatusCode); @@ -85,7 +85,7 @@ public async Task GetResourceById_Passing_Repository_OK() using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.OK, res.StatusCode); @@ -100,7 +100,7 @@ public async Task GetResourceById_NoContent() using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.NoContent, res.StatusCode); @@ -115,7 +115,7 @@ public async Task GetResourceById_Passing_Repository_NoContent() using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.NoContent, res.StatusCode); @@ -130,7 +130,7 @@ public async Task GetResourceById_PassingNoValidArgument_NoContent() using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.NoContent, res.StatusCode); diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetSectorsTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetSectorsTests.cs index b39a5d2c1f9..08b8d4239f2 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetSectorsTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetSectorsTests.cs @@ -23,7 +23,7 @@ public async Task GetSectors() using HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); //Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); string sectorscontent = await res.Content.ReadAsStringAsync(); List dataThemes = System.Text.Json.JsonSerializer.Deserialize>(sectorscontent, new System.Text.Json.JsonSerializerOptions() { PropertyNamingPolicy = System.Text.Json.JsonNamingPolicy.CamelCase }); diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetValidateResourceTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetValidateResourceTests.cs index f9ec01dca5c..ded615bbf23 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetValidateResourceTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/GetValidateResourceTests.cs @@ -24,7 +24,7 @@ public async Task ValidateServiceResourceById_IsValid() RepositoryMock.Setup(r => r.GetServiceResourceById(It.IsAny(), It.IsAny(), It.IsAny())).Returns(GetServiceResourceForValidationTest(true)); //Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); //Assert RepositoryMock.VerifyAll(); @@ -41,7 +41,7 @@ public async Task ValidateServiceResourceById_IsInValid() RepositoryMock.Setup(r => r.GetServiceResourceById(It.IsAny(), It.IsAny(), It.IsAny())).Returns(GetServiceResourceForValidationTest(false)); //Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); //Assert RepositoryMock.VerifyAll(); @@ -58,7 +58,7 @@ public async Task ValidateServiceResource_IsValid() RepositoryMock.Setup(r => r.GetServiceResources(It.IsAny(), It.IsAny(), It.IsAny())).Returns(GetServiceResourcesForValidationTest(true)); //Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); //Assert RepositoryMock.VerifyAll(); @@ -75,7 +75,7 @@ public async Task ValidateServiceResource_IsInValid() RepositoryMock.Setup(r => r.GetServiceResources(It.IsAny(), It.IsAny(), It.IsAny())).Returns(GetServiceResourcesForValidationTest(false)); //Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); //Assert RepositoryMock.VerifyAll(); diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/ImportResourceTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/ImportResourceTests.cs index eea619b85ac..b5bb00a9c92 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/ImportResourceTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/ImportResourceTests.cs @@ -35,7 +35,7 @@ public async Task ExportAltinn2Resource() Altinn2MetadataClientMock.Setup(r => r.GetXacmlPolicy(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(policy); // Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); // Assert Assert.Equal(HttpStatusCode.OK, res.StatusCode); diff --git a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/UpdateResourceTests.cs b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/UpdateResourceTests.cs index 11d1a31a7bf..d39164222da 100644 --- a/backend/tests/Designer.Tests/Controllers/ResourceAdminController/UpdateResourceTests.cs +++ b/backend/tests/Designer.Tests/Controllers/ResourceAdminController/UpdateResourceTests.cs @@ -48,7 +48,7 @@ public async Task UpdateServiceResource_StatusCreated() httpRequestMessage.Content = new StringContent(JsonConvert.SerializeObject(serviceResource), System.Text.Encoding.UTF8, "application/json"); //Act - using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false); + using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage); //Assert RepositoryMock.VerifyAll();