public SetMovementPartialRejectedHandlerTests() { var context = new TestIwsContext(); context.Users.Add(UserFactory.Create(TestIwsContext.UserId, AnyString, AnyString, AnyString, AnyString)); notificationId = Guid.NewGuid(); movementId = Guid.NewGuid(); rejectDate = SystemTime.UtcNow; wasteDate = SystemTime.UtcNow; partialRejectionMovement = A.Fake <IPartialRejectionMovement>(); movementRepository = A.Fake <IMovementRepository>(); var notificationRepository = A.Fake <INotificationApplicationRepository>(); var userContext = A.Fake <IUserContext>(); A.CallTo(() => notificationRepository.GetById(notificationId)) .Returns(new TestableNotificationApplication() { NotificationNumber = NotificatioNumber }); A.CallTo(() => userContext.UserId).Returns(TestIwsContext.UserId); handler = new RecordPartialRejectionInternalHandler(partialRejectionMovement, context); }
public PartialRejectMovementTests() { SystemTime.Freeze(Today); movementRepository = A.Fake <IMovementRepository>(); movementPartialRejectionRepository = A.Fake <IMovementPartialRejectionRepository>(); partialRejectionFactory = new PartialRejectionMovement(movementRepository, movementPartialRejectionRepository); }
public RecordPartialRejectionInternalHandler(IPartialRejectionMovement partialRejectionMovement, IwsContext context) { this.partialRejectionMovement = partialRejectionMovement; this.context = context; }