Skip to content

Commit

Permalink
Fix wrong test names
Browse files Browse the repository at this point in the history
  • Loading branch information
ITaluone committed Apr 19, 2022
1 parent c04d669 commit a714a80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions Tests/FluentAssertions.Specs/Xml/XDocumentAssertionSpecs.cs
Expand Up @@ -1274,7 +1274,7 @@ public void Document_is_valid_and_expected_null_with_x_name_overload_it_fails()
}

[Fact]
public void Chaining_which_after_asserting_and_the_document_has_more_than_two_child_elements_it_fails()
public void Chaining_which_after_asserting_and_the_document_has_more_than_two_child_elements_it_passes()
{
// Arrange
var document = XDocument.Parse(
Expand All @@ -1284,12 +1284,9 @@ public void Chaining_which_after_asserting_and_the_document_has_more_than_two_ch
<child />
</parent>");

// Act
Action act = () => document.Should().HaveElement("child", AtLeast.Twice())
// Act / Assert
document.Should().HaveElement("child", AtLeast.Twice())
.Which.Should().NotBeNull();

// Assert
act.Should().NotThrow<XunitException>();
}

[Fact]
Expand Down
9 changes: 3 additions & 6 deletions Tests/FluentAssertions.Specs/Xml/XElementAssertionSpecs.cs
Expand Up @@ -1324,7 +1324,7 @@ public void Element_is_valid_and_expected_null_with_x_name_overload_it_fails()
}

[Fact]
public void Chaining_which_after_asserting_and_the_element_has_more_than_two_child_elements_it_fails()
public void Chaining_which_after_asserting_and_the_element_has_more_than_two_child_elements_it_passes()
{
// Arrange
var element = XElement.Parse(
Expand All @@ -1334,12 +1334,9 @@ public void Chaining_which_after_asserting_and_the_element_has_more_than_two_chi
<child />
</parent>");

// Act
Action act = () => element.Should().HaveElement("child", AtLeast.Twice())
// Act / Assert
element.Should().HaveElement("child", AtLeast.Twice())
.Which.Should().NotBeNull();

// Assert
act.Should().NotThrow();
}

[Fact]
Expand Down

0 comments on commit a714a80

Please sign in to comment.