private static Pipeline <TSubject> GetPipeline <TSubject>()
            where TSubject : class
        {
            var factory = new DefaultTaskFactory();

            factory.Register <Increment>(() => new Increment());
            factory.Register <Square>(() => new Square());

            return(new Pipeline <TSubject>(factory));
        }
Beispiel #2
0
        public void AddingTheSameTaskThrowsAnException()
        {
            Action act = () => { factory.Register <SuperTask>(() => null); };

            act.ShouldThrow <TaskAlreadyRegisteredException>()
            .WithMessage("The task SuperTask has already been registered.");
        }
Beispiel #3
0
 public void SetUp()
 {
     factory = new DefaultTaskFactory();
     factory.Register <SuperTask>(() => new SuperTask(5));
 }
 public DefaultTaskFactoryTests()
 {
     factory = new DefaultTaskFactory();
     factory.Register <SuperTask>(() => new SuperTask(5));
 }