public void Should_Add_WithMessageCommand_When_WithMessage() { var builder = new SpecificationBuilder <object>(); builder.WithMessage("message"); Assert.Single(builder.Commands); Assert.IsType <WithMessageCommand>(builder.Commands.Single()); var command = (WithMessageCommand)builder.Commands.Single(); Assert.Equal("WithMessage", command.Name); Assert.Equal("message", command.Message); }
public void Should_ThrowException_When_WithMessage_And_NullMessage() { var builder = new SpecificationBuilder <object>(); Assert.Throws <ArgumentNullException>(() => { builder.WithMessage(null); }); }