public CoreBackgroundJobFactoryFacts()
        {
            _stateMachine = new Mock<IStateMachine>();
            _context = new CreateContextMock();
            _transaction = new Mock<IWriteOnlyTransaction>();

            _context.Connection.Setup(x => x.CreateExpiredJob(
                It.IsAny<Job>(),
                It.IsAny<IDictionary<string, string>>(),
                It.IsAny<DateTime>(),
                It.IsAny<TimeSpan>())).Returns(JobId);
            _context.Connection.Setup(x => x.CreateWriteTransaction())
                .Returns(_transaction.Object);
        }
Exemplo n.º 2
0
        public CoreBackgroundJobFactoryFacts()
        {
            _stateMachine = new Mock <IStateMachine>();
            _context      = new CreateContextMock();
            _transaction  = new Mock <IWriteOnlyTransaction>();

            _context.Connection.Setup(x => x.CreateExpiredJob(
                                          It.IsAny <Job>(),
                                          It.IsAny <IDictionary <string, string> >(),
                                          It.IsAny <DateTime>(),
                                          It.IsAny <TimeSpan>())).Returns(JobId);
            _context.Connection.Setup(x => x.CreateWriteTransaction())
            .Returns(_transaction.Object);
        }