예제 #1
0
        public void Bad_TrySplit_works()
        {
            ILogFileNameComposer logFileNameComposer = new LogFileNameComposer("MyApp", "MyLog", ".MyExt");

            string prefix, roll;

            logFileNameComposer.TryParse("20010203-BAD-MyApp-MyLog.MyExt", out prefix, out roll).ShouldBe(false);
        }
예제 #2
0
        public void OK_TrySplit_with_roll_works()
        {
            ILogFileNameComposer logFileNameComposer = new LogFileNameComposer("MyApp", "MyLog", ".MyExt");

            string prefix, roll;

            logFileNameComposer.TryParse("20010203-MyApp-MyLog.MyExt.1", out prefix, out roll).ShouldBe(true);

            prefix.ShouldBe("20010203");
            roll.ShouldBe("1");
        }