From 2733578fed7997277df2cf2ee5e703211fb19e90 Mon Sep 17 00:00:00 2001 From: Lukas Gasselsberger | alu-one Date: Tue, 19 Apr 2022 09:25:48 +0200 Subject: [PATCH] Fix wrong test names --- .../Xml/XDocumentAssertionSpecs.cs | 13 +++++-------- .../Xml/XElementAssertionSpecs.cs | 9 +++------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Tests/FluentAssertions.Specs/Xml/XDocumentAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Xml/XDocumentAssertionSpecs.cs index 2de6972558..8ae93e90a9 100644 --- a/Tests/FluentAssertions.Specs/Xml/XDocumentAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Xml/XDocumentAssertionSpecs.cs @@ -1177,7 +1177,7 @@ public void When_asserting_document_has_two_child_elements_and_it_does_it_succee } [Fact] - public void Asserting_document_inside_an_assertion_scope_it_checks_the_whole_assertion_scope_before_failing() + public void Asserting_document_null_inside_an_assertion_scope_it_checks_the_whole_assertion_scope_before_failing() { // Arrange XDocument document = null; @@ -1197,7 +1197,7 @@ public void Asserting_document_inside_an_assertion_scope_it_checks_the_whole_ass } [Fact] - public void Asserting_document_inside_an_assertion_scope_it_checks_the_whole_assertion_scope_before_failing_() + public void Asserting_with_document_root_null_inside_an_assertion_scope_it_checks_the_whole_assertion_scope_before_failing() { // Arrange XDocument document = new(); @@ -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( @@ -1284,12 +1284,9 @@ public void Chaining_which_after_asserting_and_the_document_has_more_than_two_ch "); - // Act - Action act = () => document.Should().HaveElement("child", AtLeast.Twice()) + // Act / Assert + document.Should().HaveElement("child", AtLeast.Twice()) .Which.Should().NotBeNull(); - - // Assert - act.Should().NotThrow(); } [Fact] diff --git a/Tests/FluentAssertions.Specs/Xml/XElementAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Xml/XElementAssertionSpecs.cs index 17fe547f32..280178d33f 100644 --- a/Tests/FluentAssertions.Specs/Xml/XElementAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Xml/XElementAssertionSpecs.cs @@ -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( @@ -1334,12 +1334,9 @@ public void Chaining_which_after_asserting_and_the_element_has_more_than_two_chi "); - // 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]