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

            log = new FakeCakeLog();
            var fileSystem             = new FileSystem();
            var environment            = new CakeEnvironment(new CakePlatform(), new CakeRuntime(), log);
            var globber                = new Globber(fileSystem, environment);
            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;
        }
        public FakeCakeContext()
        {
            testsDir = new DirectoryPath(System.IO.Path.GetFullPath(AppContext.BaseDirectory));

            log = new FakeCakeLog();
            var fileSystem             = new FileSystem();
            var environment            = new CakeEnvironment(new CakePlatform(), new CakeRuntime(), log);
            var globber                = new Globber(fileSystem, environment);
            var args                   = new FakeCakeArguments();
            var registry               = new WindowsRegistry();
            var toolRepo               = new ToolRepository(environment);
            var config                 = new FakeConfiguration();
            var toolResolutionStrategy = new ToolResolutionStrategy(fileSystem, environment, globber, config);
            var toolLocator            = new ToolLocator(environment, toolRepo, toolResolutionStrategy);
            var processRunner          = new ProcessRunner(fileSystem, environment, log, toolLocator, config);
            var data                   = Substitute.For <ICakeDataService>();

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