Esempio n. 1
0
		public void Should_rethrow_and_log_exceptions_from_job()
		{
			//Logger.EnsureInitialized(); //view sample error logging in output by uncommenting
			var agent = new ExceptionThrowingStubJob();
			ExceptionThrowingFactoryStub.JobAgent = agent;
			var program = new Program();
			program.GetFactoryTypeName = () => typeof(ExceptionThrowingFactoryStub).FullName + "," + GetType().Assembly.FullName;

			try
			{
				program.Run(new[] {"foo"});
				Assert.Fail("Should not have reached here-Program should have thrown");
			}catch
			{

			}
		}
Esempio n. 2
0
        public void Should_rethrow_and_log_exceptions_from_job()
        {
            //Logger.EnsureInitialized(); //view sample error logging in output by uncommenting
            var agent = new ExceptionThrowingStubJob();

            ExceptionThrowingFactoryStub.JobAgent = agent;
            var program = new Program();

            program.GetFactoryTypeName = () => typeof(ExceptionThrowingFactoryStub).FullName + "," + GetType().Assembly.FullName;

            try
            {
                program.Run(new[] { "foo" });
                Assert.Fail("Should not have reached here-Program should have thrown");
            }catch
            {
            }
        }
Esempio n. 3
0
 public ExceptionThrowingFactoryStub()
 {
     JobAgent = new ExceptionThrowingStubJob(_logger);
 }
Esempio n. 4
0
		public ExceptionThrowingFactoryStub()
		{
			JobAgent = new ExceptionThrowingStubJob(_logger);
		}