public static void UseExecutionStrategySubstitute(this CakeHostBuilderFixture fixture)
 {
     fixture.Strategy = Substitute.For <IExecutionStrategy>();
 }
 public static T RegisterTaskLifetimeSubstitute <T>(this CakeHostBuilderFixture fixture, T lifetime)
     where T : class, IFrostingTaskLifetime
 {
     fixture.Builder.ConfigureServices(s => s.RegisterInstance(lifetime).As <IFrostingTaskLifetime>());
     return(lifetime);
 }
 public static CakeHostBuilderFixture RegisterTask <T>(this CakeHostBuilderFixture fixture)
     where T : IFrostingTask
 {
     fixture.Builder.ConfigureServices(services => services.RegisterType <T>().As <IFrostingTask>());
     return(fixture);
 }
        public static FakeTaskLifetime RegisterTaskLifetimeSubstitute(this CakeHostBuilderFixture fixture)
        {
            var lifetime = new FakeTaskLifetime();

            return(fixture.RegisterTaskLifetimeSubstitute(lifetime));
        }
 public static CakeHostBuilderFixture RegisterDefaultTask(this CakeHostBuilderFixture fixture)
 {
     fixture.RegisterTask <DummyTask>();
     fixture.Options.Target = typeof(DummyTask).Name;
     return(fixture);
 }