Пример #1
0
        public void ValidatePathException_File()
        {
            var exception = new FilePathValidatorException("abc", false);

            Console.Out.WriteLine("Message : " + exception.Message);
            Assert.IsTrue(exception.Message.Contains("file"));
        }
Пример #2
0
        public void ValidatePathException_Directory()
        {
            var exception = new FilePathValidatorException("abc", true);

            Console.Out.WriteLine("Message : " + exception.Message);
            Assert.IsTrue(exception.Message.Contains("directory"));
        }
Пример #3
0
        public void ValidatePathException_InhibitedChar()
        {
            var exception = new FilePathValidatorException("<>:\"|?*\u0000\u001f", false);

            Console.Out.WriteLine("Message : " + exception.Message);
            Assert.IsTrue(exception.Message.Contains("<>:\"|?*<0000><001F>"));
        }