示例#1
0
 public LoggingFactoryStub()
 {
     if (JobAgent == null)
     {
         JobAgent = new StubJob(_logger);
     }
 }
示例#2
0
 public FactoryStub()
 {
     if (JobAgent == null)
     {
         JobAgent = new StubJob();
     }
 }
示例#3
0
 public void Should_locate_a_factory_and_execute_a_job()
 {
     var agent = new StubJob();
     FactoryStub.JobAgent = agent;
     var program = new Program();
     program.GetFactoryTypeName = () => typeof (FactoryStub).FullName + "," + GetType().Assembly.FullName;
     program.Run(new[] {"foo"});
     Assert.That(FactoryStub.Name, Is.EqualTo("foo"));
     Assert.That(agent.Executed, Is.True);
 }
示例#4
0
        public void Should_locate_a_factory_and_execute_a_job()
        {
            var agent = new StubJob();

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

            program.GetFactoryTypeName = () => typeof(FactoryStub).FullName + "," + GetType().Assembly.FullName;
            program.Run(new[] { "foo" });
            Assert.That(FactoryStub.Name, Is.EqualTo("foo"));
            Assert.That(agent.Executed, Is.True);
        }
示例#5
0
		public LoggingFactoryStub()
		{
			if (JobAgent == null)
			{
				JobAgent = new StubJob(_logger);
			}
		}
示例#6
0
 public FactoryStub()
 {
     if(JobAgent==null)
     {
         JobAgent = new StubJob();
     }
 }