Skip to content

Commit

Permalink
dotnet format
Browse files Browse the repository at this point in the history
  • Loading branch information
standeren committed Oct 22, 2023
1 parent b0ec34a commit 736f6de
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public async Task GetFilteredLinkServices()
Altinn2MetadataClientMock.Setup(r => r.AvailableServices(It.IsAny<int>(), It.IsAny<string>())).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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<LosTerm> losTerms = System.Text.Json.JsonSerializer.Deserialize<List<LosTerm>>(sectorscontent, new System.Text.Json.JsonSerializerOptions() { PropertyNamingPolicy = System.Text.Json.JsonNamingPolicy.CamelCase });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -67,7 +67,7 @@ public async Task GetResourceList_NoContent()
.Returns(new List<ServiceResource>());

// Act
using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false);
using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage);

// Assert
Assert.Equal(HttpStatusCode.NoContent, res.StatusCode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<DataTheme> dataThemes = System.Text.Json.JsonSerializer.Deserialize<List<DataTheme>>(sectorscontent, new System.Text.Json.JsonSerializerOptions() { PropertyNamingPolicy = System.Text.Json.JsonNamingPolicy.CamelCase });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public async Task ValidateServiceResourceById_IsValid()
RepositoryMock.Setup(r => r.GetServiceResourceById(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())).Returns(GetServiceResourceForValidationTest(true));

//Act
using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false);
using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage);

//Assert
RepositoryMock.VerifyAll();
Expand All @@ -41,7 +41,7 @@ public async Task ValidateServiceResourceById_IsInValid()
RepositoryMock.Setup(r => r.GetServiceResourceById(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())).Returns(GetServiceResourceForValidationTest(false));

//Act
using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false);
using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage);

//Assert
RepositoryMock.VerifyAll();
Expand All @@ -58,7 +58,7 @@ public async Task ValidateServiceResource_IsValid()
RepositoryMock.Setup(r => r.GetServiceResources(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())).Returns(GetServiceResourcesForValidationTest(true));

//Act
using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false);
using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage);

//Assert
RepositoryMock.VerifyAll();
Expand All @@ -75,7 +75,7 @@ public async Task ValidateServiceResource_IsInValid()
RepositoryMock.Setup(r => r.GetServiceResources(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())).Returns(GetServiceResourcesForValidationTest(false));

//Act
using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage).ConfigureAwait(false);
using HttpResponseMessage res = await HttpClient.SendAsync(httpRequestMessage);

//Assert
RepositoryMock.VerifyAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task ExportAltinn2Resource()
Altinn2MetadataClientMock.Setup(r => r.GetXacmlPolicy(It.IsAny<string>(), It.IsAny<int>(), It.IsAny<string>(), It.IsAny<string>())).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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 736f6de

Please sign in to comment.