public StrongNameResolverFixture(bool is64Bit = true) { _is64Bit = is64Bit; FileSystem = Substitute.For <IFileSystem>(); Environment = new FakeEnvironment(PlatformFamily.Windows, _is64Bit); Environment.SetSpecialPath(SpecialPath.ProgramFiles, "/ProgramFiles"); Environment.SetSpecialPath(SpecialPath.ProgramFilesX86, "/ProgramFilesX86"); Registry = Substitute.For <IRegistry>(); }
public UnityRunnerFixture() { ProjectPath = new DirectoryPath("C:/Project"); Platform = Substitute.For <UnityPlatform>(); DefaultToolPathExist = true; ProjectPathExist = true; Process = new FakeProcess(); ProcessRunner = Substitute.For <IProcessRunner>(); ProcessRunner.Start(Arg.Any <FilePath>(), Arg.Any <ProcessSettings>()).Returns(Process); Environment = new FakeEnvironment(PlatformFamily.Windows) { WorkingDirectory = "/Working" }; Environment.SetSpecialPath(SpecialPath.ProgramFilesX86, "C:/Program Files (x86)"); FileSystem = new FakeFileSystem(Environment); var globber = new Globber(FileSystem, Environment); Tools = new ToolLocator(Environment, new ToolRepository(Environment), new ToolResolutionStrategy(FileSystem, Environment, globber, new FakeConfiguration())); Context = new CakeContext(FileSystem, Environment, globber, new FakeLog(), Substitute.For <ICakeArguments>(), ProcessRunner, Substitute.For <IRegistry>(), Tools, Substitute.For <ICakeDataService>()); }