public SetMultipleMovementFileIdHandlerTests() { var context = new TestIwsContext(); context.Users.Add(UserFactory.Create(TestIwsContext.UserId, AnyString, AnyString, AnyString, AnyString)); notificationId = Guid.NewGuid(); fileId = Guid.NewGuid(); var userId = TestIwsContext.UserId; movementRepository = A.Fake <IMovementRepository>(); notificationRepository = A.Fake <INotificationApplicationRepository>(); fileRepository = A.Fake <IFileRepository>(); movementAuditRepository = A.Fake <IMovementAuditRepository>(); var userContext = A.Fake <IUserContext>(); A.CallTo(() => notificationRepository.GetById(notificationId)) .Returns(new TestableNotificationApplication() { NotificationNumber = NotificatioNumber }); A.CallTo(() => fileRepository.Store(A <File> .Ignored)).Returns(fileId); A.CallTo(() => userContext.UserId).Returns(userId); handler = new SetMultipleMovementFileIdHandler(context, movementRepository, notificationRepository, fileRepository, movementAuditRepository, userContext); }
public SetMovementRejectedHandlerTests() { var context = new TestIwsContext(); context.Users.Add(UserFactory.Create(TestIwsContext.UserId, AnyString, AnyString, AnyString, AnyString)); notificationId = Guid.NewGuid(); movementId = Guid.NewGuid(); rejectDate = SystemTime.UtcNow; rejectMovement = A.Fake <IRejectMovement>(); movementRepository = A.Fake <IMovementRepository>(); fileRepository = A.Fake <IFileRepository>(); movementAuditRepository = A.Fake <IMovementAuditRepository>(); var notificationRepository = A.Fake <INotificationApplicationRepository>(); var nameGenerator = new MovementFileNameGenerator(notificationRepository); var certificateFactory = new CertificateFactory(); var userContext = A.Fake <IUserContext>(); A.CallTo(() => notificationRepository.GetById(notificationId)) .Returns(new TestableNotificationApplication() { NotificationNumber = NotificatioNumber }); A.CallTo(() => fileRepository.Store(A <File> .Ignored)).Returns(Guid.NewGuid()); A.CallTo(() => userContext.UserId).Returns(TestIwsContext.UserId); handler = new SetMovementRejectedHandler(rejectMovement, movementRepository, context, nameGenerator, certificateFactory, fileRepository, movementAuditRepository, userContext); }
public SaveMovementCompletedReceiptHandlerTests() { var context = new TestIwsContext(); context.Users.Add(UserFactory.Create(TestIwsContext.UserId, AnyString, AnyString, AnyString, AnyString)); notificationId = Guid.NewGuid(); movementId = Guid.NewGuid(); fileId = Guid.NewGuid(); var userContext = A.Fake <IUserContext>(); movementRepository = A.Fake <IMovementRepository>(); fileRepository = A.Fake <IFileRepository>(); notificationRepository = A.Fake <INotificationApplicationRepository>(); movementAuditRepository = A.Fake <IMovementAuditRepository>(); A.CallTo(() => notificationRepository.GetById(notificationId)) .Returns(new TestableNotificationApplication() { NotificationNumber = NotificationNumber }); A.CallTo(() => fileRepository.Store(A <File> .Ignored)).Returns(fileId); var nameGenerator = new CertificateOfRecoveryNameGenerator(notificationRepository); var certificateFactory = new CertificateFactory(); handler = new SaveMovementCompletedReceiptHandler(context, fileRepository, movementRepository, certificateFactory, nameGenerator, userContext, notificationRepository, movementAuditRepository); }
public SetMovementAcceptedHandler(IMovementRepository movementRepository, IwsContext context, IUserContext userContext, IMovementAuditRepository movementAuditRepository) { this.movementRepository = movementRepository; this.context = context; this.userContext = userContext; this.movementAuditRepository = movementAuditRepository; }
public GetMovementAuditByNotificationIdHandlerTests() { notificationId = Guid.NewGuid(); mapper = A.Fake <IMapper>(); repository = A.Fake <IMovementAuditRepository>(); handler = new GetMovementAuditByNotificationIdHandler(mapper, repository); }
public CancelMovementsHandler(IwsContext context, IMovementRepository repository, IMovementAuditRepository movementAuditRepository, IUserContext userContext, ICapturedMovementFactory capturedMovementFactory) { this.repository = repository; this.context = context; this.movementAuditRepository = movementAuditRepository; this.userContext = userContext; this.capturedMovementFactory = capturedMovementFactory; }
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 CreateMovementsHandler(MovementFactory movementFactory, MovementDetailsFactory movementDetailsFactory, INotificationApplicationRepository notificationRepository, IwsContext context, IMovementAuditRepository movementAuditRepository, IUserContext userContext) { this.movementFactory = movementFactory; this.movementDetailsFactory = movementDetailsFactory; this.context = context; this.notificationRepository = notificationRepository; this.movementAuditRepository = movementAuditRepository; this.userContext = userContext; }
public SetMultipleMovementFileIdHandler(IwsContext context, IMovementRepository movementRepository, INotificationApplicationRepository notificationRepository, IFileRepository fileRepository, IMovementAuditRepository movementAuditRepository, IUserContext userContext) { this.context = context; this.movementRepository = movementRepository; this.notificationRepository = notificationRepository; this.fileRepository = fileRepository; this.movementAuditRepository = movementAuditRepository; this.userContext = userContext; }
public SetMovementAcceptedHandlerTests() { var context = new TestIwsContext(); context.Users.Add(UserFactory.Create(TestIwsContext.UserId, AnyString, AnyString, AnyString, AnyString)); notificationId = Guid.NewGuid(); movementId = Guid.NewGuid(); movementRepository = A.Fake <IMovementRepository>(); var userContext = A.Fake <IUserContext>(); movementAuditRepository = A.Fake <IMovementAuditRepository>(); handler = new SetMovementAcceptedHandler(movementRepository, context, userContext, movementAuditRepository); }
public UpdateMovementDateHandlerTests() { var context = new TestIwsContext(); context.Users.Add(UserFactory.Create(TestIwsContext.UserId, AnyString, AnyString, AnyString, AnyString)); notificationId = Guid.NewGuid(); var validator = A.Fake <IUpdatedMovementDateValidator>(); repository = A.Fake <IMovementRepository>(); movementAuditRepository = A.Fake <IMovementAuditRepository>(); var userContext = A.Fake <IUserContext>(); A.CallTo(() => userContext.UserId).Returns(TestIwsContext.UserId); handler = new UpdateMovementDateHandler(repository, validator, context, movementAuditRepository, userContext); }
public SaveMovementCompletedReceiptHandler(IwsContext context, IFileRepository fileRepository, IMovementRepository movementRepository, CertificateFactory certificateFactory, CertificateOfRecoveryNameGenerator nameGenerator, IUserContext userContext, INotificationApplicationRepository notificationRepository, IMovementAuditRepository movementAuditRepository) { this.context = context; this.fileRepository = fileRepository; this.movementRepository = movementRepository; this.certificateFactory = certificateFactory; this.nameGenerator = nameGenerator; this.userContext = userContext; this.notificationRepository = notificationRepository; this.movementAuditRepository = movementAuditRepository; }
public SetMovementRejectedHandler(IRejectMovement rejectMovement, IMovementRepository movementRepository, IwsContext context, MovementFileNameGenerator nameGenerator, CertificateFactory certificateFactory, IFileRepository fileRepository, IMovementAuditRepository movementAuditRepository, IUserContext userContext) { this.rejectMovement = rejectMovement; this.movementRepository = movementRepository; this.context = context; this.nameGenerator = nameGenerator; this.certificateFactory = certificateFactory; this.fileRepository = fileRepository; this.movementAuditRepository = movementAuditRepository; this.userContext = userContext; }
public CreatePrenotificationHandler(INotificationApplicationRepository notificationRepository, IDraftMovementRepository draftMovementRepository, IwsContext context, MovementFactory movementFactory, MovementDetailsFactory movementDetailsFactory, IFileRepository fileRepository, IMovementAuditRepository movementAuditRepository, IUserContext userContext) { this.notificationRepository = notificationRepository; this.draftMovementRepository = draftMovementRepository; this.context = context; this.movementFactory = movementFactory; this.movementDetailsFactory = movementDetailsFactory; this.fileRepository = fileRepository; this.movementAuditRepository = movementAuditRepository; this.userContext = userContext; }
public CancelMovementsHandlerTests() { notificationId = Guid.NewGuid(); var userId = TestIwsContext.UserId; var context = new TestIwsContext(); context.Users.Add(UserFactory.Create(TestIwsContext.UserId, AnyString, AnyString, AnyString, AnyString)); repository = A.Fake <IMovementRepository>(); movementAuditRepository = A.Fake <IMovementAuditRepository>(); var userContext = A.Fake <IUserContext>(); capturedMovementFactory = A.Fake <ICapturedMovementFactory>(); A.CallTo(() => userContext.UserId).Returns(userId); handler = new CancelMovementsHandler(context, repository, movementAuditRepository, userContext, capturedMovementFactory); }
public CreateReceiptRecoveryHandler(IDraftMovementRepository draftMovementRepository, IMovementRepository movementRepository, IwsContext context, IUserContext userContext, IFileRepository fileRepository, CertificateFactory certificateFactory, CertificateOfReceiptNameGenerator receiptNameGenerator, CertificateOfRecoveryNameGenerator recoveryNameGenerator, INotificationApplicationRepository notificationRepository, IMovementAuditRepository movementAuditRepository) { this.draftMovementRepository = draftMovementRepository; this.movementRepository = movementRepository; this.context = context; this.userContext = userContext; this.fileRepository = fileRepository; this.certificateFactory = certificateFactory; this.receiptNameGenerator = receiptNameGenerator; this.recoveryNameGenerator = recoveryNameGenerator; this.notificationRepository = notificationRepository; this.movementAuditRepository = movementAuditRepository; }
public GetMovementAuditByNotificationIdHandler(IMapper mapper, IMovementAuditRepository repository) { this.mapper = mapper; this.repository = repository; }
public AuditMovementHandler(IwsContext context, IMovementAuditRepository repository, IMapper mapper) { this.context = context; this.repository = repository; this.mapper = mapper; }