public void Should_fail_with_descriptive_message_when_asserting_object_assignable_to_not_implemented_type()
        {
            var someObject = new DummyImplementingClass();

            someObject.Invoking(
                x => x.Should().BeAssignableTo<DateTime>("because we want to test the failure {0}", "message"))
                .ShouldThrow<AssertFailedException>()
                .WithMessage(string.Format(
                    "Expected object to be assignable to {1} because we want to test the failure message, but {0} does not implement {1}",
                    typeof(DummyImplementingClass), typeof(DateTime)));
        }
        public void Should_fail_with_descriptive_message_when_asserting_object_assignable_to_not_implemented_type()
        {
            var someObject = new DummyImplementingClass();

            someObject.Invoking(
                x => x.Should().BeAssignableTo <DateTime>("because we want to test the failure {0}", "message"))
            .ShouldThrow <AssertFailedException>()
            .WithMessage(string.Format(
                             "Expected object to be assignable to {1} because we want to test the failure message, but {0} does not implement {1}",
                             typeof(DummyImplementingClass), typeof(DateTime)));
        }
        public void When_asserting_an_object_is_assignable_to_an_unrelated_type_it_should_fail_with_a_descriptive_message()
        {
            //-----------------------------------------------------------------------------------------------------------
            // Arrange
            //-----------------------------------------------------------------------------------------------------------
            var someObject = new DummyImplementingClass();

            //-----------------------------------------------------------------------------------------------------------
            // Act / Assert
            //-----------------------------------------------------------------------------------------------------------
            someObject.Invoking(
                x => x.Should().BeAssignableTo <DateTime>("because we want to test the failure {0}", "message"))
            .ShouldThrow <AssertFailedException>()
            .WithMessage(string.Format(
                             "Expected object to be assignable to {1} because we want to test the failure message, but {0} is not",
                             typeof(DummyImplementingClass), typeof(DateTime)));
        }
        public void When_asserting_an_object_is_assignable_to_an_unrelated_type_it_should_fail_with_a_descriptive_message()
        {
            //-----------------------------------------------------------------------------------------------------------
            // Arrange
            //-----------------------------------------------------------------------------------------------------------
            var someObject = new DummyImplementingClass();

            //-----------------------------------------------------------------------------------------------------------
            // Act / Assert
            //-----------------------------------------------------------------------------------------------------------
            someObject.Invoking(
                x => x.Should().BeAssignableTo<DateTime>("because we want to test the failure {0}", "message"))
                .ShouldThrow<AssertFailedException>()
                .WithMessage(string.Format(
                    "Expected object to be assignable to {1} because we want to test the failure message, but {0} is not",
                    typeof(DummyImplementingClass), typeof(DateTime)));
        }