public CreateMovementInternalHandler(ICapturedMovementFactory factory, IMovementRepository movementRepository, IwsContext context) { this.factory = factory; this.movementRepository = movementRepository; this.context = context; }
public CreateMovementInternalHandlerTests() { context = new TestIwsContext(); factory = A.Fake<ICapturedMovementFactory>(); movementRepository = A.Fake<IMovementRepository>(); handler = new CreateMovementInternalHandler(factory, movementRepository, context); }
public CapturedMovementFactoryTests() { validator = A.Fake<IMovementNumberValidator>(); assessmentRepository = A.Fake<INotificationAssessmentRepository>(); A.CallTo(() => assessmentRepository.GetByNotificationId(NotificationId)) .Returns(new TestableNotificationAssessment { Status = NotificationStatus.Consented }); factory = new CapturedMovementFactory(validator, assessmentRepository, A.Fake<IUserContext>()); }
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 CapturedMovementFactoryTests() { SystemTime.Freeze(Today); validator = A.Fake <IMovementNumberValidator>(); assessmentRepository = A.Fake <INotificationAssessmentRepository>(); A.CallTo(() => assessmentRepository.GetByNotificationId(NotificationId)) .Returns(new TestableNotificationAssessment { Status = NotificationStatus.Consented }); factory = new CapturedMovementFactory(validator, assessmentRepository, A.Fake <IUserContext>()); }
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); }