예제 #1
0
 public void TestGetMatchedSubdirectoryPath_Root()
 {
     string expected = @"I:\hoge\i";
     SplitFolder sf = new SplitFolder(new DirectoryInfo(@"I:\hoge"));
     string actual = sf.GetMatchedSubdirectoryPath(new FileInfo(@"I:hoge\ika.txt"));
     Assert.AreEqual(expected, actual);
 }
예제 #2
0
        public void TestGetMatchedSubdirectoryPath_SecondLevel()
        {
            string expected = @"I:\hoge\i\k";
            SplitFolder sf = new SplitFolder(new DirectoryInfo(@"I:\hoge"));
            sf.Current = CreateDIC(sf.StartDirectory, @"I:\hoge\i");
            string actual = sf.GetMatchedSubdirectoryPath(new FileInfo(@"I:\hoge\ika.txt"));

            Assert.AreEqual(expected, actual);
        }
예제 #3
0
        public void TestGetMatchedSubdirectoryPath_CantMoveMore()
        {
            string expected = @"I:\hoge\a";
            SplitFolder sf = new SplitFolder(new DirectoryInfo(@"I:\hoge"));
            sf.Current = new DirectoryInfoCache(sf.StartDirectory, new DirectoryInfo(@"I:\hoge\a"));
            string actual = sf.GetMatchedSubdirectoryPath(new FileInfo(@"I:\hoge\a.html"));

            Assert.AreEqual(expected, actual);
        }