Esempio n. 1
0
        public async Task UpdateDate(DateTime newDate, IUpdatedMovementDateValidator validator)
        {
            await validator.EnsureDateValid(this, newDate);

            var previousDate = Date;

            Date = newDate;

            RaiseEvent(new MovementDateChangeEvent(Id, previousDate));
        }
Esempio n. 2
0
 public UpdateMovementDateHandler(IMovementRepository repository,
                                  IUpdatedMovementDateValidator validator,
                                  IwsContext context,
                                  IMovementAuditRepository movementAuditRepository,
                                  IUserContext userContext)
 {
     this.repository = repository;
     this.context    = context;
     this.validator  = validator;
     this.movementAuditRepository = movementAuditRepository;
     this.userContext             = userContext;
 }
 public IsProposedUpdatedMovementDateValidHandler(IUpdatedMovementDateValidator validator,
                                                  IMovementRepository repository)
 {
     this.validator  = validator;
     this.repository = repository;
 }
Esempio n. 4
0
        public MovementDateTests()
        {
            validator = A.Fake <IUpdatedMovementDateValidator>();

            SystemTime.Freeze(Today);
        }
        public MovementDateTests()
        {
            validator = A.Fake<IUpdatedMovementDateValidator>();

            SystemTime.Freeze(Today);
        }
Esempio n. 6
0
        public async Task UpdateDate(DateTime newDate, IUpdatedMovementDateValidator validator)
        {
            await validator.EnsureDateValid(this, newDate);

            var previousDate = Date;
            Date = newDate;

            RaiseEvent(new MovementDateChangeEvent(Id, previousDate));
        }