예제 #1
0
파일: RootEntryTest.cs 프로젝트: CDEApp/CDE
        public void CanonicalPath_UNCTrailingSlash2_OK()
        {
            var          re       = new RootEntryTestStub(isUnc: true, root: @"\\Friday\d$", fullPath: @"\\Friday\d$");
            const string testPath = @"\\Friday\d$";

            var result = re.CanonicalPath(testPath);

            Assert.That(result, Is.EqualTo(@"\\Friday\d$\"));
        }
예제 #2
0
파일: RootEntryTest.cs 프로젝트: CDEApp/CDE
        public void CanonicalPath_DeviceRelativePath_OK()
        {
            var          re       = new RootEntryTestStub(isUnc: false, root: @"g:\", fullPath: @"g:\");
            const string testPath = @"g:";

            var result = re.CanonicalPath(testPath);

            Assert.That(result, Is.EqualTo(@"G:\"));
        }
예제 #3
0
파일: RootEntryTest.cs 프로젝트: CDEApp/CDE
        public void CanonicalPath_TrailingSlash_OK()
        {
            var          re       = new RootEntryTestStub(isUnc: false, root: @"c:\", fullPath: @"c:\Windows");
            const string testPath = @"c:\Windows\";

            var result = re.CanonicalPath(testPath);

            Assert.That(result, Is.EqualTo(@"C:\Windows"));
        }
예제 #4
0
파일: RootEntryTest.cs 프로젝트: CDEApp/CDE
        public void GetDefaultFileName_RootedPathByLeadingSlash_UsingFullPath()
        {
            var    re = new RootEntryTestStub(fullPath: @"C:\MyTestFolder\Mine");
            string hint, volRoot, volName;

            var canonicalName = re.CanonicalPath(@"\MyTestFolder\Mine");
            var fileName      = re.GetDefaultFileName(canonicalName, out hint, out volRoot, out volName);

            Assert.That(hint, Is.EqualTo(@"C"));
            Assert.That(volRoot, Is.EqualTo(@"C:\"));
            Assert.That(volName, Is.EqualTo(@"VolName"));
            Assert.That(fileName, Is.EqualTo(@"C-VolName-C__MyTestFolder_Mine.cde"));
        }