Skip to content

Commit

Permalink
Take care of some code style practices
Browse files Browse the repository at this point in the history
  • Loading branch information
ITaluone committed Apr 20, 2022
1 parent 79387ba commit 8a8f930
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Src/FluentAssertions/Xml/XDocumentAssertions.cs
Expand Up @@ -300,11 +300,11 @@ public AndConstraint<XDocumentAssertions> NotBeEquivalentTo(XDocument unexpected
{
var root = Subject.Root;
success = Execute.Assertion
.ForCondition(root is not null)
.BecauseOf(because, becauseArgs)
.FailWith(
"Expected {context:subject} to have root element with child {0}{reason}, but it has no root element.",
expected.ToString());
.ForCondition(root is not null)
.BecauseOf(because, becauseArgs)
.FailWith(
"Expected {context:subject} to have root element with child {0}{reason}, but it has no root element.",
expected.ToString());

if (success)
{
Expand All @@ -315,7 +315,8 @@ public AndConstraint<XDocumentAssertions> NotBeEquivalentTo(XDocument unexpected
.ForConstraint(occurrenceConstraint, actualCount)
.BecauseOf(because, becauseArgs)
.FailWith(
$"Expected {{context:subject}} to have {occurrenceConstraint.Mode} {{0}} child element(s) {{1}}{{reason}}, but found {{2}}.",
$"Expected {{context:subject}} to have {occurrenceConstraint.Mode} {{0}} " +
$"child element(s) {{1}}{{reason}}, but found {{2}}.",
occurrenceConstraint.ExpectedCount,
expected.ToString(),
actualCount);
Expand Down

0 comments on commit 8a8f930

Please sign in to comment.