public void When_asserting_a_non_null_xml_document_is_null_it_should_fail() { //------------------------------------------------------------------------------------------------------------------- // Arrange //------------------------------------------------------------------------------------------------------------------- var document = new XDocument(); //------------------------------------------------------------------------------------------------------------------- // Act //------------------------------------------------------------------------------------------------------------------- Action act = () => document.Should().BeNull(); //------------------------------------------------------------------------------------------------------------------- // Assert //------------------------------------------------------------------------------------------------------------------- act.ShouldThrow<AssertFailedException>(); }
public void When_asserting_a_non_null_xml_document_is_not_null_it_should_succeed() { //------------------------------------------------------------------------------------------------------------------- // Arrange //------------------------------------------------------------------------------------------------------------------- var document = new XDocument(); //------------------------------------------------------------------------------------------------------------------- // Act //------------------------------------------------------------------------------------------------------------------- Action act = () => document.Should().NotBeNull(); //------------------------------------------------------------------------------------------------------------------- // Assert //------------------------------------------------------------------------------------------------------------------- act.ShouldNotThrow(); }
public void When_asserting_a_xml_document_is_equal_to_a_different_xml_document_it_should_fail() { //------------------------------------------------------------------------------------------------------------------- // Arrange //------------------------------------------------------------------------------------------------------------------- var document = new XDocument(); var otherXDocument = new XDocument(); //------------------------------------------------------------------------------------------------------------------- // Act //------------------------------------------------------------------------------------------------------------------- Action act = () => document.Should().Be(otherXDocument); //------------------------------------------------------------------------------------------------------------------- // Assert //------------------------------------------------------------------------------------------------------------------- act.ShouldThrow<AssertFailedException>(); }
public void When_asserting_a_xml_document_is_equal_to_the_same_xml_document_it_should_succeed() { //------------------------------------------------------------------------------------------------------------------- // Arrange //------------------------------------------------------------------------------------------------------------------- var document = new XDocument(); var sameXDocument = document; //------------------------------------------------------------------------------------------------------------------- // Act //------------------------------------------------------------------------------------------------------------------- Action act = () => document.Should().Be(sameXDocument); //------------------------------------------------------------------------------------------------------------------- // Assert //------------------------------------------------------------------------------------------------------------------- act.ShouldNotThrow(); }
public void When_asserting_a_xml_document_is_not_equal_to_the_same_xml_document_it_should_fail() { //------------------------------------------------------------------------------------------------------------------- // Arrange //------------------------------------------------------------------------------------------------------------------- var document = new XDocument(); var sameXDocument = document; //------------------------------------------------------------------------------------------------------------------- // Act //------------------------------------------------------------------------------------------------------------------- Action act = () => document.Should().NotBe(sameXDocument); //------------------------------------------------------------------------------------------------------------------- // Assert //------------------------------------------------------------------------------------------------------------------- act.ShouldThrow<AssertFailedException>(); }
public void When_asserting_a_xml_document_is_not_equal_to_a_different_xml_document_it_should_succeed() { //------------------------------------------------------------------------------------------------------------------- // Arrange //------------------------------------------------------------------------------------------------------------------- var document = new XDocument(); var otherXDocument = new XDocument(); //------------------------------------------------------------------------------------------------------------------- // Act //------------------------------------------------------------------------------------------------------------------- Action act = () => document.Should().NotBe(otherXDocument); //------------------------------------------------------------------------------------------------------------------- // Assert //------------------------------------------------------------------------------------------------------------------- act.ShouldNotThrow(); }