Example #1
0
        public void InitialState_TestingValidatedCommand_SuccessResultReplied()
        {
            var aggregateId = TestAggregateId.New;
            var commandId   = SourceId.New;
            var command     = new ValidatedCommand(aggregateId, true).WithSourceId(commandId);

            var result = RulesHelper.ProcessRules(command);

            result.Should().NotBeNull().And.Match <ValidationResult>(r => r.IsValid);
        }
Example #2
0
 /// <summary>
 /// Configures the command and returns the instance.
 /// </summary>
 /// <param name="command"></param>
 /// <param name="configure"></param>
 /// <returns></returns>
 public static Command Configure(this ValidatedCommand command, Action <ValidatedCommand> configure)
 {
     configure(command);
     return(command);
 }