示例#1
0
        public void Expand_now()
        {
            var target = new ProcessMode {
                RootDirectory = new DirectoryInfo(@"c:\Demo")
            };
            var pi = new PhotoModel {
                LocalPath = @"c:\Demo\2001\Vacation\image1.jpg"
            };
            var actual = target.Expand("{now}", pi);

            TestContext.WriteLine("{0}", actual);
            Assert.IsFalse(actual.Contains("{"));
        }
示例#2
0
        public void Expand_fname()
        {
            var target = new ProcessMode {
                RootDirectory = new DirectoryInfo(@"c:\Demo")
            };
            var pi = new PhotoModel {
                LocalPath = @"c:\Demo\2001\Vacation\image1.jpg"
            };
            var actual   = target.Expand("{fname}", pi);
            var expected = @"image1";

            TestContext.WriteLine("{0}", actual);
            Assert.AreEqual(expected, actual);
        }
示例#3
0
        public void Expand_relpathastags_2()
        {
            var target = new ProcessMode {
                RootDirectory = new DirectoryInfo(@"c:\Demo")
            };
            var pi = new PhotoModel {
                LocalPath = @"c:\Demo\2001, 2002\Vacation\image1.jpg"
            };
            var actual   = target.Expand("{RelPathAsTags}", pi);
            var expected = "2001_ 2002,Vacation";

            TestContext.WriteLine("{0}", actual);
            Assert.AreEqual(expected, actual);
        }