internal ToolFixtureProcessRunner(Func <FilePath, ProcessSettings, TFixtureResult> factory) { _factory = factory; _results = new List <TFixtureResult>(); Process = new FakeProcess(); }
void CreateViewModelUsingCreatedRecentRepository() { CreateMachineCache(); CreateOptions(); fakeProcess = new FakeProcess(); CreateViewModel(options); }
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>()); }
public void NullErrors_ShouldNotBeSharedAsLogEntry() { var process = new FakeProcess(); var chefProcess = CreateChefProcess(() => process); process.ErrorDataReceivedDuringWaitForExit.Add(null); AssertChefProcessRunShouldNotGenerateLogEntries(chefProcess); }
void CreateViewModelUsingCreatedRecentRepository() { CreateMachineCache(); fakeProcess = new FakeProcess(); viewModel = new PackageManagementOptionsViewModel(fakeRecentRepository, fakeMachineCache, fakeProcess); }
public TheMkDocsIsSupportedVersionMethod() { _process = new FakeProcess(); _process.SetStandardOutput(new[] { "mkdocs, version 1.0 from \\local\\python\\python36\\lib\\site-packages\\mkdocs (Python 3.6)" }); }