public void Should_fail_when_asserting_nullable_numeric_value_equals_a_different_value() { // Arrange DateOnly?nullableDateOnlyA = new DateOnly(2016, 06, 04); DateOnly?nullableDateOnlyB = new DateOnly(2016, 06, 06); // Act Action action = () => nullableDateOnlyA.Should().Be(nullableDateOnlyB); // Assert action.Should().Throw <XunitException>(); }