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 SetMovementFileIdHandler(IwsContext context, IMovementRepository movementRepository, MovementFileNameGenerator nameGenerator, CertificateFactory certificateFactory, IFileRepository fileRepository) { this.context = context; this.movementRepository = movementRepository; this.nameGenerator = nameGenerator; this.certificateFactory = certificateFactory; this.fileRepository = fileRepository; }
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; }