public FakeCakeContext () { testsDir = new DirectoryPath ( System.IO.Path.GetFullPath( System.IO.Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "../../"))); var environment = Cake.Testing.FakeEnvironment.CreateUnixEnvironment (false); var fileSystem = new Cake.Testing.FakeFileSystem (environment); var globber = new Globber (fileSystem, environment); log = new Cake.Testing.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; }
public FakeCakeContext() { testsDir = new DirectoryPath(System.IO.Path.GetFullPath(AppContext.BaseDirectory)); var environment = Cake.Testing.FakeEnvironment.CreateUnixEnvironment(false); var fileSystem = new Cake.Testing.FakeFileSystem(environment); var globber = new Globber(fileSystem, environment); log = new FakeLog(); var args = new FakeCakeArguments(); var processRunner = new ProcessRunner(environment, log); var registry = new WindowsRegistry(); var toolLocator = new ToolLocator(environment, new ToolRepository(environment), new ToolResolutionStrategy(fileSystem, environment, globber, new FakeConfiguration())); context = new CakeContext(fileSystem, environment, globber, log, args, processRunner, registry, toolLocator); context.Environment.WorkingDirectory = testsDir; }