Exemplo n.º 1
0
        public SharedUserRepositoryTests()
        {
            ownerUser = UserFactory.Create(Guid.NewGuid(), "Owner", "User", "12345",
                                           "*****@*****.**");
            sharedUser = UserFactory.Create(Guid.NewGuid(), "Shared", "User", "12345",
                                            "*****@*****.**");

            var userContext = A.Fake <IUserContext>();

            A.CallTo(() => userContext.UserId).Returns(Guid.Parse(ownerUser.Id));

            context       = new IwsContext(userContext, A.Fake <IEventDispatcher>());
            authorization = A.Fake <INotificationApplicationAuthorization>();
            repository    = new SharedUserRepository(context, authorization);

            preRunNotifications = context.NotificationApplications.Select(na => na.Id).ToArray();

            notification = NotificationApplicationFactory.Create(Guid.Parse(ownerUser.Id), NotificationType.Recovery,
                                                                 UKCompetentAuthority.England, 20191);

            context.Users.Add(ownerUser);
            context.Users.Add(sharedUser);
            context.NotificationApplications.Add(notification);
            context.SaveChanges();
        }
 public NotificationMovementsSummaryRepository(INotificationApplicationAuthorization notificationAuthorization,
                                               NotificationMovementsQuantity quantity,
                                               IwsContext context)
 {
     this.quantity = quantity;
     this.notificationAuthorization = notificationAuthorization;
     this.context = context;
 }
 public NotificationMovementsSummaryRepository(INotificationApplicationAuthorization notificationAuthorization,
     NotificationMovementsQuantity quantity,
     IwsContext context)
 {
     this.quantity = quantity;
     this.notificationAuthorization = notificationAuthorization;
     this.context = context;
 }
 public NotificationApplicationOverviewRepository(
     IwsContext db,
     INotificationChargeCalculator chargeCalculator,
     INotificationProgressService progressService,
     INotificationApplicationAuthorization authorization)
 {
     this.db = db;
     this.chargeCalculator = chargeCalculator;
     this.progressService  = progressService;
     this.authorization    = authorization;
 }
 public NotificationApplicationOverviewRepository(
     IwsContext db,
     INotificationChargeCalculator chargeCalculator,
     INotificationProgressService progressService,
     INotificationApplicationAuthorization authorization)
 {
     this.db = db;
     this.chargeCalculator = chargeCalculator;
     this.progressService = progressService;
     this.authorization = authorization;
 }
Exemplo n.º 6
0
        public NotificationApplicationRepositoryTests()
        {
            userId = Guid.NewGuid();

            var userContext = A.Fake <IUserContext>();

            A.CallTo(() => userContext.UserId).Returns(userId);

            context = new IwsContext(userContext, A.Fake <IEventDispatcher>());

            notificationApplicationAuthorization = A.Fake <INotificationApplicationAuthorization>();
        }
 public NotificationAssessmentDatesSummaryRepository(DecisionRequiredBy decisionRequiredBy,
     INotificationAssessmentRepository notificationAssessmentRepository,
     INotificationApplicationRepository notificationApplicationRepository,
     INotificationTransactionCalculator transactionCalculator,
     INotificationApplicationAuthorization authorization)
 {
     this.decisionRequiredBy = decisionRequiredBy;
     this.notificationApplicationRepository = notificationApplicationRepository;
     this.notificationAssessmentRepository = notificationAssessmentRepository;
     this.transactionCalculator = transactionCalculator;
     this.authorization = authorization;
 }
Exemplo n.º 8
0
 public NotificationAssessmentDatesSummaryRepository(DecisionRequiredBy decisionRequiredBy,
                                                     INotificationAssessmentRepository notificationAssessmentRepository,
                                                     INotificationApplicationRepository notificationApplicationRepository,
                                                     INotificationTransactionCalculator transactionCalculator,
                                                     INotificationApplicationAuthorization authorization)
 {
     this.decisionRequiredBy = decisionRequiredBy;
     this.notificationApplicationRepository = notificationApplicationRepository;
     this.notificationAssessmentRepository  = notificationAssessmentRepository;
     this.transactionCalculator             = transactionCalculator;
     this.authorization = authorization;
 }
 public FacilityRepository(IwsContext context, INotificationApplicationAuthorization notificationApplicationAuthorization)
 {
     this.context = context;
     this.notificationApplicationAuthorization = notificationApplicationAuthorization;
 }
Exemplo n.º 10
0
 public SharedUserRepository(IwsContext context, INotificationApplicationAuthorization authorization)
 {
     this.context       = context;
     this.authorization = authorization;
 }
 public NotificationAssessmentDecisionRepository(IwsContext context, INotificationApplicationAuthorization authorization)
 {
     this.context       = context;
     this.authorization = authorization;
 }
Exemplo n.º 12
0
 public MeansOfTransportRepository(IwsContext context,
                                   INotificationApplicationAuthorization authorization)
 {
     this.context       = context;
     this.authorization = authorization;
 }
 public NumberOfShipmentsHistoryRepository(IwsContext context, INotificationApplicationAuthorization notificationApplicationAuthorization)
 {
     this.context = context;
     this.notificationApplicationAuthorization = notificationApplicationAuthorization;
 }
 public WasteRecoveryRepository(IwsContext context, INotificationApplicationAuthorization notificationApplicationAuthorization)
 {
     this.context = context;
     this.notificationApplicationAuthorization = notificationApplicationAuthorization;
 }
Exemplo n.º 15
0
 public NotificationConsentRepository(IwsContext context, INotificationApplicationAuthorization authorization)
 {
     this.context       = context;
     this.authorization = authorization;
 }
 public MovementAuthorization(INotificationApplicationAuthorization notificationAuthorization,
     IMovementRepository repository)
 {
     this.notificationAuthorization = notificationAuthorization;
     this.repository = repository;
 }
 public TransportRouteRepository(IwsContext context, INotificationApplicationAuthorization notificationApplicationAuthorization)
 {
     this.context = context;
     this.notificationApplicationAuthorization = notificationApplicationAuthorization;
 }
Exemplo n.º 18
0
 public MovementAuthorization(INotificationApplicationAuthorization notificationAuthorization,
                              IMovementRepository repository)
 {
     this.notificationAuthorization = notificationAuthorization;
     this.repository = repository;
 }
 public ProducerRepository(IwsContext context,
     INotificationApplicationAuthorization authorization)
 {
     this.context = context;
     this.authorization = authorization;
 }
Exemplo n.º 20
0
 public FinancialGuaranteeRepository(IwsContext context, INotificationApplicationAuthorization authorization)
 {
     this.context       = context;
     this.authorization = authorization;
 }
Exemplo n.º 21
0
 public NumberOfShipmentsHistoryRepository(IwsContext context, INotificationApplicationAuthorization notificationApplicationAuthorization)
 {
     this.context = context;
     this.notificationApplicationAuthorization = notificationApplicationAuthorization;
 }
 public GetNotificationIdByNumberHandler(INotificationApplicationRepository notificationApplicationRepository,
                                         INotificationApplicationAuthorization notificationApplicationAuthorization)
 {
     this.notificationApplicationRepository    = notificationApplicationRepository;
     this.notificationApplicationAuthorization = notificationApplicationAuthorization;
 }
Exemplo n.º 23
0
 public TransportRouteRepository(IwsContext context, INotificationApplicationAuthorization notificationApplicationAuthorization)
 {
     this.context = context;
     this.notificationApplicationAuthorization = notificationApplicationAuthorization;
 }
 public ExporterRepository(IwsContext context, INotificationApplicationAuthorization notificationApplicationAuthorization)
 {
     this.context = context;
     this.notificationApplicationAuthorization = notificationApplicationAuthorization;
 }
Exemplo n.º 25
0
 public NotificationApplicationRepository(IwsContext context,
                                          INotificationApplicationAuthorization notificationApplicationAuthorization)
 {
     this.context = context;
     this.notificationApplicationAuthorization = notificationApplicationAuthorization;
 }
 public ConsultationRepository(IwsContext context, INotificationApplicationAuthorization authorization)
 {
     this.context = context;
     this.authorization = authorization;
 }
 public MeansOfTransportRepository(IwsContext context,
     INotificationApplicationAuthorization authorization)
 {
     this.context = context;
     this.authorization = authorization;
 }
Exemplo n.º 28
0
 public GetFileHandler(IFileRepository fileRepository, INotificationApplicationAuthorization authorization)
 {
     this.fileRepository = fileRepository;
     this.authorization  = authorization;
 }
 public ShipmentInfoRepository(IwsContext context, INotificationApplicationAuthorization notificationApplicationAuthorization)
 {
     this.context = context;
     this.notificationApplicationAuthorization = notificationApplicationAuthorization;
 }
Exemplo n.º 30
0
 public ComplianceRepository(IwsContext context, INotificationApplicationAuthorization authorization)
 {
     this.context       = context;
     this.authorization = authorization;
 }