public void Given_Message_And_Exception_When_Instantiated_Then_It_Should_Return_Message_And_Exception(string message) { var innerException = new ApplicationException(); var ex = new SchemaNotFoundException(message, innerException); ex.Message.Should().Be(message); ex.InnerException.Should().Be(innerException); }
public void Given_Null_Sink_When_WithSink_Invoked_Then_It_Should_Throw_Exception() { var ex = new SchemaNotFoundException(); Action action = () => ex.WithSchemaConsumer(null); action.Should().Throw <ArgumentNullException>(); }
public void Given_Sink_When_WithSink_Invoked_Then_It_Should_Return_Result() { var consumer = new SchemaConsumer(); var ex = new SchemaNotFoundException() .WithSchemaConsumer(consumer); ex.Should().BeOfType <SchemaNotFoundException>(); }
public void Given_Message_When_Instantiated_Then_It_Should_Return_Message(string message) { var ex = new SchemaNotFoundException(message); ex.Message.Should().Be(message); }
public void Given_Default_When_Instantiated_Then_It_Should_Return_Message() { var ex = new SchemaNotFoundException(); ex.Message.Should().Be(SchemaNotFound); }
public void Given_Default_When_Instantiated_Then_It_Should_Return_Null_Sink() { var ex = new SchemaNotFoundException(); ex.Consumer.Should().BeNull(); }