Skip to content

Commit

Permalink
Various fixes for the NuGet package description. (#5)
Browse files Browse the repository at this point in the history
* Various fixes for the NuGet package.
* Fix the release notes.
  • Loading branch information
GillesTourreau authored Oct 10, 2023
1 parent 418947c commit bac412e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Company>P.O.S Informatique</Company>
<Product>P.O.S Informatique</Product>
<Copyright>Copyright (c) P.O.S Informatique. All rights reserved.</Copyright>
<RepositoryUrl>https://github.com/PosInformatique/PosInformatique.FluentAssertions.Json.git</RepositoryUrl>
<RepositoryUrl>https://github.com/PosInformatique/PosInformatique.FluentAssertions.Json</RepositoryUrl>
<RepositoryType>git</RepositoryType>

<!-- Enable the last version of C# -->
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ PosInformatique.FluentAssertions.Json is a library to assert JSON serialization
## Installing from NuGet
The [PosInformatique.FluentAssertions.Json](https://www.nuget.org/packages/PosInformatique.FluentAssertions.Json/)
library is available directly on the
[NuGet](https://www.nuget.org/packages/PosInformatique.FluentAssertions.Json/) official website.
[![Nuget](https://img.shields.io/nuget/v/PosInformatique.FluentAssertions.Json)](https://www.nuget.org/packages/PosInformatique.FluentAssertions.Json/)
official website.

To download and install the library to your Visual Studio unit test projects use the following NuGet command line

Expand Down Expand Up @@ -68,7 +69,7 @@ public void Serialization()
```

With the following kind of exception when the unit test is incorrect:
![Ugly exception](./docs/UglyExceptionExample.png)
![Ugly exception](https://raw.githubusercontent.com/PosInformatique/PosInformatique.FluentAssertions.Json/main/docs/UglyExceptionExample.png)

As you can see the previous code is not sexy to read (and to write!) and the exception is
hard to understand...
Expand All @@ -95,7 +96,7 @@ public void Serialization()
```

And when an exception is occured, the exception message contains the JSON path of the property which is error:
![Pretty exception](./docs/PrettyExceptionExample.png)
![Pretty exception](https://raw.githubusercontent.com/PosInformatique/PosInformatique.FluentAssertions.Json/main/docs/PrettyExceptionSample.png)

### Test the deserialization of a JSON object to a .NET Object
You can in the same way test the deserialization JSON object into a .NET object.
Expand Down
21 changes: 20 additions & 1 deletion src/FluentAssertions.Json/FluentAssertions.Json.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,34 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Description>PosInformatique.FluentAssertions.Json is a library to assert JSON serialization using the Fluent Assertions library style coding.</Description>
<PackageIcon>Icon.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/PosInformatique/PosInformatique.FluentAssertions.Json</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>
1.0.1
- Various fixes for the NuGet package description.

1.0.0
- Initial version
</PackageReleaseNotes>
<PackageTags>json unittest fluent assertions assert xunit mstest serialization deserialization</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<None Update="Icon.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

</Project>
Binary file added src/FluentAssertions.Json/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bac412e

Please sign in to comment.