public void GivenARequestIsNUll_WhenValidating_ThenArgumentNullIsThrown()
        {
            AssignIsOnStrategyToFeatureRequest request = null;

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

            command.Name.Should().Be(request.Name);
            command.Path.Should().BeEquivalentTo(request.Path);
            command.AssignedBy.Should().BeEquivalentTo(request.AssignedBy);
            command.IsEnabled.Should().Be(request.IsOn);
        }
 public static Action WhenValidating(this AssignIsOnStrategyToFeatureRequest request)
 {
     return(() => request.Validate());
 }
 public static Func <AssignIsOnStrategyToFeatureCommand> WhenExtractingCommand(this AssignIsOnStrategyToFeatureRequest request)
 {
     return(() => request.ToAssignIsOnStrategyToFeatureCommand());
 }
Example #5
0
 public static Func <Task <IActionResult> > WhenProcessingCommand(
     this AssignIsOnStrategyToFeatureController controller,
     AssignIsOnStrategyToFeatureRequest request)
 {
     return(() => controller.Post(request));
 }