public void Given_Null_Sink_When_WithSink_Invoked_Then_It_Should_Throw_Exception()
        {
            var ex = new SchemaMalformedException();

            Action action = () => ex.WithSchemaConsumer(null);

            action.Should().Throw <ArgumentNullException>();
        }
        public void Given_Exception_When_Instantiated_Then_It_Should_Return_Exception()
        {
            var innerException = new ApplicationException();
            var ex             = new SchemaMalformedException(innerException);

            ex.Message.Should().Be(SchemaNotFormed);
            ex.InnerException.Should().Be(innerException);
        }
        public void Given_Message_And_Exception_When_Instantiated_Then_It_Should_Return_Message_And_Exception(string message)
        {
            var innerException = new ApplicationException();
            var ex             = new SchemaMalformedException(message, innerException);

            ex.Message.Should().Be(message);
            ex.InnerException.Should().Be(innerException);
        }
        public void Given_Sink_When_WithSink_Invoked_Then_It_Should_Return_Result()
        {
            var consumer = new Mock <ISchemaConsumer>();

            var ex = new SchemaMalformedException()
                     .WithSchemaConsumer(consumer.Object);

            ex.Should().BeOfType <SchemaMalformedException>();
        }
        public void Given_Message_When_Instantiated_Then_It_Should_Return_Message(string message)
        {
            var ex = new SchemaMalformedException(message);

            ex.Message.Should().Be(message);
        }
        public void Given_Default_When_Instantiated_Then_It_Should_Return_Message()
        {
            var ex = new SchemaMalformedException();

            ex.Message.Should().Be(SchemaNotFormed);
        }
        public void Given_Default_When_Instantiated_Then_It_Should_Return_Null_Sink()
        {
            var ex = new SchemaMalformedException();

            ex.Consumer.Should().BeNull();
        }