Skip to content

Commit a104cfc

Browse files
committed
chore: Improve wording after CoPilot review
1 parent 17033cd commit a104cfc

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

docs/articles/nunit-analyzers/NUnit2057.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Only the argument value is needed by the Assert.
1818

1919
The `Assert` method will call a delegate if passed in, but that is an unnecessary overhead.
2020

21-
In most case, only the return value is needed by the Assert:
21+
In most cases, only the return value is needed by the assertion.
2222

23-
There are two exception for this:
23+
There are two exceptions:
2424

2525
1. When catching exceptions, like in:
2626

@@ -34,7 +34,7 @@ There are two exception for this:
3434
Assert.That(() => task.IsCompleted, Is.True.After(5).Seconds.PollEvery(100).MilliSeconds);
3535
```
3636

37-
Sometimes developers unnecessary create a lambda expression for the _actual_ parameter.
37+
Sometimes developers unnecessarily create a lambda expression for the _actual_ parameter.
3838

3939
```csharp
4040
Assert.That(() => instance.Method1(Parameters), Is.EqualTo(expected));
@@ -49,7 +49,7 @@ Assert.That(instance.Method1(Parameters), Is.EqualTo(expected));
4949

5050
It is clearer both in looks and in what is being tested here.
5151

52-
Sometimes the lambda is created implicit like in:
52+
Sometimes the lambda is created implicitly like in:
5353

5454
```csharp
5555
Assert.That(instance.Method2, Is.EqualTo(expected));

docs/articles/nunit-analyzers/NUnit2058.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
## Description
1414

15-
The constraint didn't take the operator priority into account.
15+
The constraint didn't take the operator precedence into account.
1616

1717
## Motivation
1818

@@ -22,13 +22,13 @@ We have seen users wanting to test for an equivalent of `!string.IsNullOrEmpty()
2222
Assert.That(name, Is.Not.Null.Or.Empty);
2323
```
2424

25-
Because of the operator priority this actually means `Is.Not.Null | Is.Empty`.
25+
Because of the operator precedence this actually means `Is.Not.Null | Is.Empty`.
2626
The `Is.Empty` part will only be tested when the item under test is `null`.
2727
Depending on the type this either returns `false` or `throws` an `Exception`.
2828

2929
## How to fix violations
3030

31-
The code fix associated with thus rule will convert this to test for both `Not.Null` and `Not.Empty`:
31+
The code fix associated with this rule will convert this to test for both `Not.Null` and `Not.Empty`:
3232

3333
```csharp
3434
Assert.That(name, Is.Not.Null.And.Not.Empty);

0 commit comments

Comments
 (0)