Skip to content

Commit

Permalink
Convert constructor into member initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
IT-VBFK committed Aug 17, 2023
1 parent df5c0d7 commit 81881ce
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Src/FluentAssertions/Specialized/ExceptionAssertions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,7 @@ private static string BuildExceptionsString(IEnumerable<TException> exceptions)

private sealed class ExceptionMessageAssertion
{
public ExceptionMessageAssertion()
{
Context = "exception message";
}

public string Context { get; }
private readonly string Context = "exception message";

Check notice on line 269 in Src/FluentAssertions/Specialized/ExceptionAssertions.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Convert local variable or field into constant (private accessibility)

Convert into constant

public void Execute(IEnumerable<string> messages, string expectation, string because, params object[] becauseArgs)
{
Expand Down

0 comments on commit 81881ce

Please sign in to comment.