public void Should_Throw_If_Services_Reference_Is_Null() { // Given ICakeServices services = null; // When var result = Record.Exception(() => services.UseTaskLifetime <DummyTaskLifetime>()); // Then AssertEx.IsArgumentNullException(result, "services"); }
public void Configure(ICakeServices services) { services.UseContext <Context>(); services.UseLifetime <Lifetime>(); services.UseTaskLifetime <TaskLifetime>(); services.UseWorkingDirectory("."); services.UsePackageInstaller <NuGetPackageInstaller>(); // Workaround, cannot use services.UseModule<NuGetModule>(), because there is no default constructor var nuGetModule = new NuGetModule(new CakeConfiguration(new Dictionary <string, string>())); nuGetModule.Register(services); }