Esempio n. 1
0
        public void FilePathWrapper_IsPathRooted_HasRoot_UncPath_ExpectTrue()
        {
            //------------------------Arrange------------------------
            var UncPath = @"\\myPc\mydir\myfile";

            var filePathWrapper = new FilePathWrapper();
            //------------------------Act----------------------------
            var isPathRooted = filePathWrapper.IsPathRooted(UncPath);

            //------------------------Assert-------------------------
            Assert.IsTrue(isPathRooted);
        }
Esempio n. 2
0
        public void FilePathWrapper_IsPathRooted_HasNoRoot_relativePath_ExpectFalse()
        {
            //------------------------Arrange------------------------
            var relativePath = @"mydir\sudir\";

            var filePathWrapper = new FilePathWrapper();
            //------------------------Act----------------------------
            var isPathRooted = filePathWrapper.IsPathRooted(relativePath);

            //------------------------Assert-------------------------
            Assert.IsFalse(isPathRooted);
        }
Esempio n. 3
0
        public void FilePathWrapper_IsPathRooted_HasRoot_LocalDir_ExpectTrue()
        {
            //------------------------Arrange------------------------
            var path = @"O:\TestPath1\TestPath2\testFileName.txt";

            var filePathWrapper = new FilePathWrapper();
            //------------------------Act----------------------------
            var isPathRooted = filePathWrapper.IsPathRooted(path);

            //------------------------Assert-------------------------
            Assert.IsTrue(isPathRooted);
        }