Skip to content

Commit 37b46c3

Browse files
dstjdennisdoomen
authored andcommitted
Improve README.md to indicate that "using FluentAssertions.Json;" is required (#20)
1 parent 0f0ac74 commit 37b46c3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,18 @@
44
* The build status is [![Build status](https://ci.appveyor.com/api/projects/status/ub0dfcmad2cf26tf/branch/master?svg=true)](https://ci.appveyor.com/project/dennisdoomen/fluentassertions-json/branch/master)
55
* Join the chat at [![Join the chat at https://gitter.im/dennisdoomen/fluentassertions](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dennisdoomen/fluentassertions?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
66

7+
### Usage
8+
9+
Be sure to include `using FluentAssertions.Json;` otherwise false positives may occur.
10+
11+
```c#
12+
using FluentAssertions;
13+
using FluentAssertions.Json;
14+
using Newtonsoft.Json.Linq;
15+
16+
...
17+
var actual = JToken.Parse(@"{ ""key1"" : ""value"" }");
18+
var expected = JToken.Parse(@"{ ""key2"" : ""value"" }");
19+
actual.Should().BeEquivalentTo(expected);
20+
```
721

0 commit comments

Comments
 (0)