File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/FluentAssertions.Analyzers.FluentAssertionAnalyzerDocs Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -80,13 +80,13 @@ obj.Should().BeNull();
80
80
#### Failure messages
81
81
82
82
``` cs
83
- var obj = new object () ;
83
+ var obj = " test " ;
84
84
85
85
// old assertion:
86
86
Assert .IsNull (obj ); // fail message: Assert.IsNull failed.
87
87
88
88
// new assertion:
89
- obj .Should ().BeNull (); // fail message: Expected obj to be <null>, but found System.Object (HashCode=53299218) .
89
+ obj .Should ().BeNull (); // fail message: Expected obj to be <null>, but found "test" .
90
90
```
91
91
92
92
### scenario: ObjectAssertIsNotNull
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ public void ObjectAssertIsNull()
93
93
public void ObjectAssertIsNull_Failure_OldAssertion ( )
94
94
{
95
95
// arrange
96
- var obj = new object ( ) ;
96
+ var obj = "test" ;
97
97
98
98
// old assertion:
99
99
Assert . IsNull ( obj ) ;
@@ -103,7 +103,7 @@ public void ObjectAssertIsNull_Failure_OldAssertion()
103
103
public void ObjectAssertIsNull_Failure_NewAssertion ( )
104
104
{
105
105
// arrange
106
- var obj = new object ( ) ;
106
+ var obj = "test" ;
107
107
108
108
// new assertion:
109
109
obj . Should ( ) . BeNull ( ) ;
You can’t perform that action at this time.
0 commit comments