Skip to content

Commit

Permalink
Merge pull request #1958 from jnyrup/Enum_BeOneOf
Browse files Browse the repository at this point in the history
Add Enum.BeOneOf to the docs
  • Loading branch information
jnyrup committed Jul 20, 2022
2 parents 9205a42 + 616c534 commit b02b44d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/_pages/enums.md
Expand Up @@ -14,10 +14,11 @@ Fluent Assertions have several ways to compare enums.
The basic ones, `Be` and `HaveFlag`, just calls directly into `Enum.Equals` and `Enum.HasFlag`.

```csharp
enum MyEnum { One = 1, Two = 2}
enum MyEnum { One = 1, Two = 2, Three = 3}

enum.Should().Be(MyEnum.One);
enum.Should().NotBe(MyEnum.Two);
enum.Should().BeOneOf(MyEnum.One, MyEnum.Two);

regexOptions.Should().HaveFlag(RegexOptions.Global);
regexOptions.Should().NotHaveFlag(RegexOptions.CaseInsensitive);
Expand Down

0 comments on commit b02b44d

Please sign in to comment.