ResolvePath() public method

public ResolvePath ( ) : string
return string
Exemplo n.º 1
0
        public void FallsBackToFullPathsIfRelativePathsAreMissing()
        {
            var path = new SDPath("c:\\source\\someproject\\output", null);

            var resolvedPath = path.ResolvePath("c:\\buildagent\\CI_WS\\1234");

            Assert.AreEqual("c:\\source\\someproject\\output", resolvedPath);
        }
Exemplo n.º 2
0
        public void CanResolveRelativePaths()
        {
            var path = new SDPath();

            path.UpdatePath("c:\\source\\someproject\\output", "c:\\source\\someproject");

            var resolvedPath = path.ResolvePath("c:\\buildagent\\CI_WS\\1234");

            Assert.AreEqual("c:\\buildagent\\CI_WS\\1234\\output", resolvedPath);
        }
Exemplo n.º 3
0
        public void CorrectlyUpdatesThePaths()
        {
            var path = new SDPath();

            path.UpdatePath("c:\\source\\someproject\\output", "c:\\source\\someproject");

            Assert.AreEqual("c:\\source\\someproject\\output", path.FullPath);
            Assert.AreEqual("output", path.RelativePath);

            path.UpdatePath("c:\\completelydifferent\\output", "c:\\source\\someproject");

            Assert.AreEqual("c:\\completelydifferent\\output", path.FullPath);
            Assert.AreEqual("..\\..\\completelydifferent\\output", path.RelativePath);

            var resolvedPath = path.ResolvePath("c:\\source\\someproject\\superdeepdirectory");

            Assert.AreEqual("c:\\source\\completelydifferent\\output", resolvedPath);
        }