public LoggingFactoryStub() { if (JobAgent == null) { JobAgent = new StubJob(_logger); } }
public FactoryStub() { if (JobAgent == null) { JobAgent = new StubJob(); } }
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); }
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); }
public FactoryStub() { if(JobAgent==null) { JobAgent = new StubJob(); } }