protected CommonExecutorTest() { JobRepository = new InMemoryJobRepository(TimeProvider); SemaphoreRepository = new InMemorySemaphoreRepository(TimeProvider); CommandRepository = new InMemoryCommandRepository(); _mockLogging = new Mock <ILogging>(MockBehavior.Loose); }
public ExecutorRetryTest() { JobRepository = new InMemoryJobRepository(TimeProvider); SemaphoreRepository = new InMemorySemaphoreRepository(TimeProvider); CommandRepository = new InMemoryCommandRepository(); retryPlugin = new Mock <DummyRetry>(MockBehavior.Loose, RetryPluginUrn, TimeProvider, Logging) { CallBase = true }; }
public void WhenSkipLimitIsReachedThrowException() { // Using an in-memory job repository in order to increment exception count var inMemoryJobRepo = new InMemoryJobRepository(); var step = FakeStep <string, string> .Create("step1"); step.WithChunkSize(10); step.SkipLimit(5) .SkippableExceptions(typeof(Exception)); step.MockReader.Setup(r => r.Read(It.IsAny <long>(), It.IsAny <int>())).Throws <FlatFileParseException>(); Assert.Throws <FlatFileParseException>(() => step.Process(new StepContext(), inMemoryJobRepo)); }
protected CommonPlannerTest() { JobRepository = new InMemoryJobRepository(TimeProvider); AutoMapperHelper.EnsureInitialization(); }
public override void OneTimeSetUp() { AutoMapperHelper.EnsureInitialization(); JobRepository = _inMemoryJobRepository = new InMemoryJobRepository(TimeProvider); }