Example #1
0
        public FakeCakeContext()
        {
            testsDir = new DirectoryPath(
                System.IO.Path.GetFullPath(AppContext.BaseDirectory));

            var fileSystem = new FileSystem();

            log = new FakeLog();
            var runtime     = new CakeRuntime();
            var platform    = new FakePlatform(PlatformFamily.Windows);
            var environment = new CakeEnvironment(platform, runtime);
            var globber     = new Globber(fileSystem, environment);

            var args     = new FakeCakeArguments();
            var registry = new WindowsRegistry();

            var          dataService            = new FakeDataService();
            var          toolRepository         = new ToolRepository(environment);
            var          config                 = new FakeConfiguration();
            var          toolResolutionStrategy = new ToolResolutionStrategy(fileSystem, environment, globber, config, log);
            IToolLocator tools         = new ToolLocator(environment, toolRepository, toolResolutionStrategy);
            var          processRunner = new ProcessRunner(fileSystem, environment, log, tools, config);

            context = new CakeContext(fileSystem, environment, globber, log, args, processRunner, registry, tools, dataService, config);
            context.Environment.WorkingDirectory = testsDir;
        }
        public FakeCakeContext ()
        {
            testsDir = new DirectoryPath (
                System.IO.Path.GetFullPath (AppDomain.CurrentDomain.BaseDirectory));
            
            var fileSystem = new FileSystem ();
            var environment = new CakeEnvironment ();
            var globber = new Globber (fileSystem, environment);
            log = new FakeLog ();
            var args = new FakeCakeArguments ();
            var processRunner = new ProcessRunner (environment, log);
            var registry = new WindowsRegistry ();

            context = new CakeContext (fileSystem, environment, globber, log, args, processRunner, registry);
            context.Environment.WorkingDirectory = testsDir;
        }
Example #3
0
        public FakeSession()
        {
            testsDir = new DirectoryPath(
                System.IO.Path.GetFullPath(AppDomain.CurrentDomain.BaseDirectory));

            var fileSystem  = new FileSystem();
            var environment = new CakeEnvironment();
            var globber     = new Globber(fileSystem, environment);

            log = new FakeLog();
            var args          = new FakeCakeArguments();
            var processRunner = new ProcessRunner(environment, log);
            var registry      = new WindowsRegistry();

            context = new CakeContext(fileSystem, environment, globber, log, args, processRunner, registry);
            context.Environment.WorkingDirectory = testsDir;
        }
Example #4
0
 public FakeCakeContext ()
 {
     testsDir = new DirectoryPath (
         System.IO.Path.GetFullPath (AppDomain.CurrentDomain.BaseDirectory));
     
     var fileSystem = new FileSystem ();
     var environment = new CakeEnvironment (new CakePlatform (), new CakeRuntime ());
     var globber = new Globber (fileSystem, environment);
     log = new FakeLog ();
     var args = new FakeCakeArguments ();
     var processRunner = new ProcessRunner (environment, log);
     var registry = new WindowsRegistry ();
     var toolRepo = new ToolRepository (environment);
     var config = new Core.Configuration.CakeConfigurationProvider (fileSystem, environment).CreateConfiguration (testsDir, new Dictionary<string, string> ());
     var toolResolutionStrategy = new ToolResolutionStrategy (fileSystem, environment, globber, config);
     var toolLocator = new ToolLocator (environment, toolRepo, toolResolutionStrategy);
     context = new CakeContext (fileSystem, environment, globber, log, args, processRunner, registry, toolLocator);
     context.Environment.WorkingDirectory = testsDir;
 }
Example #5
0
        public FakeCakeContext()
        {
            testsDir = new DirectoryPath(System.IO.Path.GetFullPath(AppContext.BaseDirectory));

            var fileSystem  = new FileSystem();
            var environment = new FakeEnvironment(PlatformFamily.Windows);
            var globber     = new Globber(fileSystem, environment);

            log = new FakeLog();
            var args                   = new FakeCakeArguments();
            var processRunner          = new ProcessRunner(environment, log);
            var registry               = new WindowsRegistry();
            var toolRepo               = new ToolRepository(environment);
            var config                 = new Core.Configuration.CakeConfigurationProvider(fileSystem, environment).CreateConfiguration(testsDir, new Dictionary <string, string> ());
            var toolResolutionStrategy = new ToolResolutionStrategy(fileSystem, environment, globber, config);
            var toolLocator            = new ToolLocator(environment, toolRepo, toolResolutionStrategy);

            context = new CakeContext(fileSystem, environment, globber, log, args, processRunner, registry, toolLocator);
            context.Environment.WorkingDirectory = testsDir;
        }