Example #1
0
 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
     };
 }
Example #3
0
        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));
        }
Example #4
0
 protected CommonPlannerTest()
 {
     JobRepository = new InMemoryJobRepository(TimeProvider);
     AutoMapperHelper.EnsureInitialization();
 }
Example #5
0
 public override void OneTimeSetUp()
 {
     AutoMapperHelper.EnsureInitialization();
     JobRepository = _inMemoryJobRepository = new InMemoryJobRepository(TimeProvider);
 }