Ejemplo n.º 1
0
        public void SetUp()
        {
            fileSystemMock = new Mock <IFileSystem>();

            tempRoot    = SystemPath.UniqueTempPath();
            tempSubRoot = tempRoot.Combine("subrepo");

            sc = new FileSourceControl((IFileSystem)fileSystemMock.Object);
            sc.RepositoryRoot = tempRoot.ToString();
        }
Ejemplo n.º 2
0
        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");
        }
Ejemplo n.º 4
0
        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();
            }
        }
Ejemplo n.º 5
0
 public void Setup()
 {
     tempRoot      = SystemPath.UniqueTempPath().CreateDirectory();
     tempSubRoot   = tempRoot.CreateSubDirectory("subrepo");
     tempOtherRoot = SystemPath.UniqueTempPath().CreateDirectory();
 }
 public void CreateFakeOutputDir()
 {
     testDir = SystemPath.UniqueTempPath();
 }