Skip to content

Commit

Permalink
Bump Version to 7.1.0 (#139)
Browse files Browse the repository at this point in the history
* Bump Version to 7.1.0

* Remove string newline formatting
  • Loading branch information
KyleMcMaster authored May 30, 2023
1 parent e4f7f5e commit 0f54000
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,21 @@ public PersonControllerCreate(WebApplicationFactory<WebMarker> factory)
[InlineData(ENDPOINT_POST_ROUTE)]
public async Task ReturnsConflictGivenExistPerson(string route)
{
var firstName = "John";
var lastName = "Smith";
var response = await SendCreateRequest(route, firstName, lastName);
var createPersonRequestDto = new CreatePersonRequestDto
{
FirstName = "John",
LastName = "Smith"
};
var json = JsonConvert.SerializeObject(createPersonRequestDto);
var response = await _client.PostAsync(route, new StringContent(json, Encoding.UTF8, "application/json"));

Assert.Equal(HttpStatusCode.Conflict, response.StatusCode);
var stringResponse = await response.Content.ReadAsStringAsync();

var problemDetails = JsonConvert.DeserializeObject<ProblemDetails>(stringResponse);

Assert.Contains("There was a conflict.", problemDetails.Title);
Assert.Contains("Next error(s) occured:* Person (John Smith) is exist\r\n", problemDetails.Detail);
Assert.Contains("Next error(s) occured:* Person (John Smith) is exist", problemDetails.Detail);
Assert.Equal(409, problemDetails.Status);
}

private async Task<HttpResponseMessage> SendCreateRequest(string route, string firstName, string lastName)
{
var createPersonRequestDto = new CreatePersonRequestDto{ FirstName = firstName, LastName = lastName };
var json = JsonConvert.SerializeObject(createPersonRequestDto);
var data = new StringContent(json, Encoding.UTF8, "application/json");

return await _client.PostAsync(route, data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<Description>Adds ASP.NET Core filters that translate from Result to ActionResult.</Description>
<Summary>Adds ASP.NET Core filters that translate from Result to ActionResult.</Summary>
<PackageTags>result pattern web api aspnetcore mvc</PackageTags>
<PackageReleaseNotes>PRs 92 and 112. Adding support for .NET 7 and ability to improve Swagger/OpenAPI specifications when using the TranslateResultToActionResult attribute.</PackageReleaseNotes>
<PackageReleaseNotes>PR 132. Add Result.Conflict</PackageReleaseNotes>
<AssemblyName>Ardalis.Result.AspNetCore</AssemblyName>
<Version>7.0.0</Version>
<Version>7.1.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<Description>A simple package to implement the FluentValidation in Result package.</Description>
<Summary>A simple package to implement the FluentValidation in Result package.</Summary>
<PackageTags>result;pattern;web;api;aspnetcore;mvc;FluentValidation;Validation</PackageTags>
<PackageReleaseNotes>PRs 92 and 112. Adding support for .NET 7.</PackageReleaseNotes>
<PackageReleaseNotes>PR 132. Add Result.Conflict</PackageReleaseNotes>
<AssemblyName>Ardalis.Result.FluentValidation</AssemblyName>
<Version>7.0.0</Version>
<Version>7.1.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Ardalis.Result/Ardalis.Result.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<Description>A simple package to implement the Result pattern for returning from services.</Description>
<Summary>A simple package to implement the Result pattern for returning from services.</Summary>
<PackageTags>result pattern web api aspnetcore mvc</PackageTags>
<PackageReleaseNotes>PRs 92 and 112. Adding support for .NET 7</PackageReleaseNotes>
<PackageReleaseNotes>PR 132. Add Result.Conflict</PackageReleaseNotes>
<AssemblyName>Ardalis.Result</AssemblyName>
<Version>7.0.0</Version>
<Version>7.1.0</Version>
</PropertyGroup>
<ItemGroup>
<None Include="icon.png" Pack="true" Visible="false" PackagePath="" />
Expand Down

0 comments on commit 0f54000

Please # to comment.