Skip to content

Commit 65d78e2

Browse files
authored
Merge pull request #2945 from fluentassertions/main
Upmerge main to the release branch
2 parents bfbf509 + c5b2f9a commit 65d78e2

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

docs/_pages/collections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ collection.Should().Contain(collection, "", 5, 6); // It should contain the orig
5353
5454
collection.Should().OnlyContain(x => x < 10);
5555
collection.Should().ContainItemsAssignableTo<int>();
56-
collection.Should().NotContainItemsAssignableTo<string>()
56+
collection.Should().NotContainItemsAssignableTo<string>();
5757

5858
collection.Should().ContainInOrder(new[] { 1, 5, 8 });
5959
collection.Should().NotContainInOrder(new[] { 5, 1, 2 });

docs/_pages/enums.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ The basic ones, `Be` and `HaveFlag`, just calls directly into `Enum.Equals` and
1616
```csharp
1717
enum MyEnum { One = 1, Two = 2, Three = 3}
1818

19-
enum.Should().Be(MyEnum.One);
20-
enum.Should().NotBe(MyEnum.Two);
21-
enum.Should().BeOneOf(MyEnum.One, MyEnum.Two);
19+
myEnum = MyEnum.One;
20+
21+
myEnum.Should().Be(MyEnum.One);
22+
myEnum.Should().NotBe(MyEnum.Two);
23+
myEnum.Should().BeOneOf(MyEnum.One, MyEnum.Two);
2224

2325
regexOptions.Should().HaveFlag(RegexOptions.Global);
2426
regexOptions.Should().NotHaveFlag(RegexOptions.CaseInsensitive);
@@ -30,14 +32,14 @@ If you want to compare enums of different types, you can use `HaveSameValueAs` o
3032
enum SameNameEnum { One = 11 }
3133
enum SameValueEnum { OneOne = 1 }
3234

33-
MyEnum.One.Should().HaveSameNameAs(SameNameEnum.One)
34-
MyEnum.One.Should().HaveSameValueAs(SameValueEnum.OneOne)
35+
MyEnum.One.Should().HaveSameNameAs(SameNameEnum.One);
36+
MyEnum.One.Should().HaveSameValueAs(SameValueEnum.OneOne);
3537

36-
MyEnum.One.Should().NotHaveSameNameAs(SameValueEnum.OneOne)
37-
MyEnum.One.Should().NotHaveSameValueAs(SameNameEnum.One)
38+
MyEnum.One.Should().NotHaveSameNameAs(SameValueEnum.OneOne);
39+
MyEnum.One.Should().NotHaveSameValueAs(SameNameEnum.One);
3840
```
3941

40-
Lastly, if you want to verify than an enum has a specific integral value, you can use `HaveValue`.
42+
Lastly, if you want to verify that an enum has a specific integral value, you can use `HaveValue`.
4143

4244
```csharp
4345
MyEnum.One.Should().HaveValue(1);
@@ -50,4 +52,4 @@ myEnum.Should().BeDefined();
5052

5153
myEnum = (MyEnum)99;
5254
myEnum.Should().NotBeDefined();
53-
```
55+
```

0 commit comments

Comments
 (0)