Esempio n. 1
0
 public GetInternalMovementSummaryHandler(
     INotificationMovementsSummaryRepository repository, IMapper mapper, NotificationMovementsQuantity quantity)
 {
     this.repository = repository;
     this.mapper     = mapper;
     this.quantity   = quantity;
 }
 public GetMovementSummaryHandler(IMapper mapper,
                                  IMovementRepository movementRepository,
                                  INotificationMovementsSummaryRepository summaryRepository)
 {
     this.movementRepository = movementRepository;
     this.summaryRepository  = summaryRepository;
     this.mapper             = mapper;
 }
 public GetSummaryAndTableHandler(
     IFacilityRepository facilityRepository,
     INotificationMovementsSummaryRepository summaryRepository,
     IMovementRepository movementRepository,
     IMapper mapper)
 {
     this.facilityRepository = facilityRepository;
     this.movementRepository = movementRepository;
     this.mapper             = mapper;
     this.summaryRepository  = summaryRepository;
 }
Esempio n. 4
0
        public PrenotificationQuantityExceededRuleTests()
        {
            this.repo = A.Fake <INotificationMovementsSummaryRepository>();

            int intendedQuantity = 100;
            int quantityReceived = 80;

            A.CallTo(() => repo.GetById(notificationId))
            .Returns(NotificationMovementsSummary.Load(notificationId, string.Empty,
                                                       Core.Shared.NotificationType.Disposal, 10, 5, 10, 5, intendedQuantity, quantityReceived,
                                                       Core.Shared.ShipmentQuantityUnits.Kilograms,
                                                       Core.FinancialGuarantee.FinancialGuaranteeStatus.Approved,
                                                       Core.Notification.UKCompetentAuthority.England,
                                                       Core.NotificationAssessment.NotificationStatus.Consented,
                                                       new Domain.ShipmentQuantity(1, Core.Shared.ShipmentQuantityUnits.Kilograms)));
        }
        public PrenotificationOnlyNewShipmentsRuleTests()
        {
            this.repo = A.Fake <INotificationMovementsSummaryRepository>();

            var maxShipments     = 10;
            var currentShipments = 3;

            var movementSummary = NotificationMovementsSummary.Load(notificationId, string.Empty,
                                                                    Core.Shared.NotificationType.Disposal, maxShipments, currentShipments, 5, 3, 100, 10,
                                                                    Core.Shared.ShipmentQuantityUnits.Kilograms, Core.FinancialGuarantee.FinancialGuaranteeStatus.Approved,
                                                                    Core.Notification.UKCompetentAuthority.England, Core.NotificationAssessment.NotificationStatus.Consented,
                                                                    new Domain.ShipmentQuantity(1, Core.Shared.ShipmentQuantityUnits.Kilograms));

            A.CallTo(() => repo.GetById(notificationId)).Returns(movementSummary);

            rule = new PrenotificationInvalidShipmentNumberRule(repo);
        }
Esempio n. 6
0
 public GetBasicMovementSummaryHandler(IMapper mapper,
                                       INotificationMovementsSummaryRepository repository)
 {
     this.mapper     = mapper;
     this.repository = repository;
 }
Esempio n. 7
0
 public PrenotificationExcessiveShipmentsDataRule(INotificationMovementsSummaryRepository notificationMovementsSummaryRepository,
                                                  INotificationApplicationRepository notificationApplicationRepository)
 {
     this.notificationMovementsSummaryRepository = notificationMovementsSummaryRepository;
     this.notificationApplicationRepository      = notificationApplicationRepository;
 }
 public PrenotificationInvalidShipmentNumberRule(INotificationMovementsSummaryRepository repo)
 {
     this.repo = repo;
 }
Esempio n. 9
0
 public PrenotificationQuantityExceededRule(INotificationMovementsSummaryRepository repo)
 {
     this.repo = repo;
 }