public void When_subject_and_expectation_are_null_it_should_not_throw() { // Arrange SomeDto subject = null; // Act Action act = () => subject.Should().BeEquivalentTo <object>(null); // Assert act.Should().NotThrow(); }
public void When_subject_and_expectation_are_compared_for_equivalence_with_config_it_should_allow_chaining() { // Arrange SomeDto subject = null; // Act Action act = () => subject.Should().BeEquivalentTo <object>(null, opt => opt) .And.BeNull(); // Assert act.Should().NotThrow(); }
public void When_subject_is_null_it_should_throw() { // Arrange SomeDto subject = null; // Act Action act = () => subject.Should().BeEquivalentTo(new { }); // Assert act.Should().Throw <XunitException>().WithMessage( "Expected subject*to be*, but found <null>*"); }