public void SetUp() { fileSystemMock = new Mock <IFileSystem>(); tempRoot = SystemPath.UniqueTempPath(); tempSubRoot = tempRoot.Combine("subrepo"); sc = new FileSourceControl((IFileSystem)fileSystemMock.Object); sc.RepositoryRoot = tempRoot.ToString(); }
public void SetUp() { fileSystemMock = new DynamicMock(typeof(IFileSystem)); tempRoot = SystemPath.UniqueTempPath(); tempSubRoot = tempRoot.Combine("subrepo"); sc = new FileSourceControl((IFileSystem)fileSystemMock.MockInstance); sc.RepositoryRoot = tempRoot.ToString(); }
public void SetUp() { srcRoot = SystemPath.UniqueTempPath(); pubRoot = SystemPath.UniqueTempPath(); publisher = new BuildPublisher(); publisher.PublishDir = pubRoot.ToString(); publisher.SourceDir = srcRoot.ToString(); result = IntegrationResultMother.CreateSuccessful("99"); labelPubDir = pubRoot.Combine("99"); }
public void ReadUnicodeFile() { SystemPath tempDirectory = SystemPath.UniqueTempPath().CreateDirectory(); try { const string content = "yooo ез"; SystemPath tempFile = tempDirectory.CreateTextFile("test.txt", content); ProcessInfo processInfo = new ProcessInfo("cmd.exe", "/C type \"" + tempFile + "\""); processInfo.StreamEncoding = Encoding.UTF8; ProcessResult result = executor.Execute(processInfo); Assert.IsTrue(!result.Failed); Assert.AreEqual(content + Environment.NewLine, result.StandardOutput); } finally { tempDirectory.DeleteDirectory(); } }
public void Setup() { tempRoot = SystemPath.UniqueTempPath().CreateDirectory(); tempSubRoot = tempRoot.CreateSubDirectory("subrepo"); tempOtherRoot = SystemPath.UniqueTempPath().CreateDirectory(); }
public void CreateFakeOutputDir() { testDir = SystemPath.UniqueTempPath(); }