public PerformContextMock() { Connection = new Mock<IStorageConnection>(); BackgroundJob = new BackgroundJobMock(); CancellationToken = new Mock<IJobCancellationToken>(); _context = new Lazy<PerformContext>( () => new PerformContext(Connection.Object, BackgroundJob.Object, CancellationToken.Object)); }
public PerformContextMock() { Connection = new Mock <IStorageConnection>(); BackgroundJob = new BackgroundJobMock(); CancellationToken = new Mock <IJobCancellationToken>(); _context = new Lazy <PerformContext>( () => new PerformContext(Connection.Object, BackgroundJob.Object, CancellationToken.Object)); }
public PreserveCultureAttributeFacts() { _connection = new Mock<IStorageConnection>(); var storage = new Mock<JobStorage>(); var backgroundJob = new BackgroundJobMock { Id = JobId }; var state = new Mock<IState>(); var createContext = new CreateContext( storage.Object, _connection.Object, backgroundJob.Job, state.Object); _creatingContext = new CreatingContext(createContext); var performContext = new PerformContext( _connection.Object, backgroundJob.Object, new Mock<IJobCancellationToken>().Object); _performingContext = new PerformingContext(performContext); _performedContext = new PerformedContext(performContext, null, false, null); }
public PreserveCultureAttributeFacts() { _connection = new Mock <IStorageConnection>(); var storage = new Mock <JobStorage>(); var backgroundJob = new BackgroundJobMock { Id = JobId }; var state = new Mock <IState>(); var createContext = new CreateContext( storage.Object, _connection.Object, backgroundJob.Job, state.Object); _creatingContext = new CreatingContext(createContext); var performContext = new PerformContext( _connection.Object, backgroundJob.Object, new Mock <IJobCancellationToken>().Object); _performingContext = new PerformingContext(performContext); _performedContext = new PerformedContext(performContext, null, false, null); }
public ApplyStateContextMock() { Storage = new Mock<JobStorage>(); Connection = new Mock<IStorageConnection>(); Transaction = new Mock<IWriteOnlyTransaction>(); BackgroundJob = new BackgroundJobMock(); NewState = new Mock<IState>(); OldStateName = null; JobExpirationTimeout = TimeSpan.FromMinutes(1); _context = new Lazy<ApplyStateContext>( () => new ApplyStateContext( Storage.Object, Connection.Object, Transaction.Object, BackgroundJob.Object, NewStateObject ?? NewState.Object, OldStateName) { JobExpirationTimeout = JobExpirationTimeout }); }
public ApplyStateContextMock() { Storage = new Mock <JobStorage>(); Connection = new Mock <IStorageConnection>(); Transaction = new Mock <IWriteOnlyTransaction>(); BackgroundJob = new BackgroundJobMock(); NewState = new Mock <IState>(); OldStateName = null; JobExpirationTimeout = TimeSpan.FromMinutes(1); _context = new Lazy <ApplyStateContext>( () => new ApplyStateContext( Storage.Object, Connection.Object, Transaction.Object, BackgroundJob.Object, NewStateObject ?? NewState.Object, OldStateName) { JobExpirationTimeout = JobExpirationTimeout }); }