public void GivenARequestIsNUll_WhenValidating_ThenArgumentNullIsThrown()
        {
            PublishFeatureRequest request = null;

            request
            .WhenValidating()
            .ThenExceptionIsThrown <ArgumentValidationException>();
        }
        public static void ThenCommandIsFilled(this Func <PublishFeatureCommand> createFunc, PublishFeatureRequest request)
        {
            var command = createFunc();

            command.Name.Should().Be(request.Name);
            command.Path.Should().BeEquivalentTo(request.Path);
            command.PublishedBy.Should().BeEquivalentTo(request.PublishedBy);
        }
 public static Action WhenValidating(this PublishFeatureRequest request)
 {
     return(() => request.Validate());
 }
 public static Func <PublishFeatureCommand> WhenExtractingCommand(this PublishFeatureRequest request)
 {
     return(() => request.ToPublishFeatureCommand());
 }
Пример #5
0
 public static Func <Task <IActionResult> > WhenProcessingCommand(
     this PublishFeatureController controller,
     PublishFeatureRequest request)
 {
     return(() => controller.Post(request));
 }