コード例 #1
0
        public MovementFactoryTests()
        {
            SystemTime.Freeze(Today);

            shipmentRepository                 = A.Fake <IShipmentInfoRepository>();
            movementRepository                 = A.Fake <IMovementRepository>();
            assessmentRepository               = A.Fake <INotificationAssessmentRepository>();
            financialGuaranteeRepository       = A.Fake <IFinancialGuaranteeRepository>();
            consentRepository                  = A.Fake <INotificationConsentRepository>();
            workingDayCalculator               = A.Fake <IWorkingDayCalculator>();
            notificationApplicationRepository  = A.Fake <INotificationApplicationRepository>();
            financialGuaranteeRepository       = A.Fake <IFinancialGuaranteeRepository>();
            movementPartialRejectionRepository = A.Fake <IMovementPartialRejectionRepository>();

            dateValidator = A.Fake <IMovementDateValidator>();

            var movementNumberGenerator = new MovementNumberGenerator(new NextAvailableMovementNumberGenerator(movementRepository),
                                                                      movementRepository,
                                                                      shipmentRepository);
            var numberOfMovements   = new NumberOfMovements(movementRepository, shipmentRepository);
            var movementsQuatity    = new NotificationMovementsQuantity(movementRepository, shipmentRepository, movementPartialRejectionRepository);
            var numberOfActiveLoads = new NumberOfActiveLoads(movementRepository, financialGuaranteeRepository);
            var consentPeriod       = new ConsentPeriod(consentRepository, workingDayCalculator, notificationApplicationRepository);

            factory = new MovementFactory(numberOfMovements,
                                          movementsQuatity,
                                          assessmentRepository,
                                          movementNumberGenerator,
                                          numberOfActiveLoads,
                                          consentPeriod,
                                          dateValidator,
                                          financialGuaranteeRepository,
                                          A.Fake <IUserContext>());
        }
コード例 #2
0
        public MovementFactoryTests()
        {
            SystemTime.Freeze(Today);

            shipmentRepository = A.Fake<IShipmentInfoRepository>();
            movementRepository = A.Fake<IMovementRepository>();
            assessmentRepository = A.Fake<INotificationAssessmentRepository>();
            financialGuaranteeRepository = A.Fake<IFinancialGuaranteeRepository>();
            consentRepository = A.Fake<INotificationConsentRepository>();
            workingDayCalculator = A.Fake<IWorkingDayCalculator>();
            notificationApplicationRepository = A.Fake<INotificationApplicationRepository>();
            financialGuaranteeRepository = A.Fake<IFinancialGuaranteeRepository>();

            dateValidator = A.Fake<IMovementDateValidator>();

            var movementNumberGenerator = new MovementNumberGenerator(new NextAvailableMovementNumberGenerator(movementRepository), 
                movementRepository, 
                shipmentRepository);
            var numberOfMovements = new NumberOfMovements(movementRepository, shipmentRepository);
            var movementsQuatity = new NotificationMovementsQuantity(movementRepository, shipmentRepository);
            var numberOfActiveLoads = new NumberOfActiveLoads(movementRepository, financialGuaranteeRepository);
            var consentPeriod = new ConsentPeriod(consentRepository, workingDayCalculator, notificationApplicationRepository);

            factory = new MovementFactory(numberOfMovements,
                movementsQuatity,
                assessmentRepository,
                movementNumberGenerator,
                numberOfActiveLoads,
                consentPeriod,
                dateValidator,
                financialGuaranteeRepository,
                A.Fake<IUserContext>());
        }
コード例 #3
0
 public UpdatedMovementDateValidator(IMovementDateValidator movementDateValidator,
                                     OriginalMovementDate originalMovementDate,
                                     IWorkingDayCalculator workingDayCalculator,
                                     INotificationApplicationRepository notificationRepository)
 {
     this.originalMovementDate   = originalMovementDate;
     this.workingDayCalculator   = workingDayCalculator;
     this.notificationRepository = notificationRepository;
     this.movementDateValidator  = movementDateValidator;
 }
コード例 #4
0
ファイル: MovementFactory.cs プロジェクト: DEFRA/prsd-iws
 public MovementFactory(NumberOfMovements numberOfMovements,
                        NotificationMovementsQuantity movementsQuantity,
                        INotificationAssessmentRepository assessmentRepository,
                        MovementNumberGenerator numberGenerator,
                        NumberOfActiveLoads numberOfActiveLoads,
                        ConsentPeriod consentPeriod,
                        IMovementDateValidator dateValidator,
                        IFinancialGuaranteeRepository financialGuaranteeRepository,
                        IUserContext userContext)
 {
     this.numberOfMovements            = numberOfMovements;
     this.movementsQuantity            = movementsQuantity;
     this.assessmentRepository         = assessmentRepository;
     this.numberGenerator              = numberGenerator;
     this.numberOfActiveLoads          = numberOfActiveLoads;
     this.consentPeriod                = consentPeriod;
     this.dateValidator                = dateValidator;
     this.financialGuaranteeRepository = financialGuaranteeRepository;
     this.userContext = userContext;
 }
コード例 #5
0
 public IsProposedMovementDateValidHandler(IMovementDateValidator validator)
 {
     this.validator = validator;
 }