Пример #1
0
        public void IsTheSameFilesystemPath_NullPathRef_Exception()
        {
            string pathReference = null;
            string pathToTest    = "Path";

            Assert.Throws(typeof(ArgumentNullException), () => StringLib.IsTheSameFilesystemPath(pathReference, pathToTest, false));
        }
Пример #2
0
        public void IsTheSameFilesystemPath_Path1Slash_Path1_CorrrectResult()
        {
            string pathReference = @"C:\Path1\";
            string pathToTest    = @"Path1";
            bool   result        = StringLib.IsTheSameFilesystemPath(pathReference, pathToTest, false);

            Assert.IsTrue(result);
        }
Пример #3
0
        public void IsTheSameFilesystemPath_BothEqual_CorrrectResult()
        {
            string pathReference = @"C:\Path1";
            string pathToTest    = @"C:\Path1";
            bool   result        = StringLib.IsTheSameFilesystemPath(pathReference, pathToTest, true);

            Assert.IsTrue(result);
        }
Пример #4
0
        public void IsTheSameFilesystemPath_2LevelsNoDr_Path2_CorrrectResult()
        {
            string pathReference = @"Path1\Path2";
            string pathToTest    = @"Path2";
            bool   result        = StringLib.IsTheSameFilesystemPath(pathReference, pathToTest, false);

            Assert.IsFalse(result);
        }
Пример #5
0
        public void IsTheSameFilesystemPath_Capitalized_Uppercase_CorrrectResult()
        {
            string pathReference = @"OnePath";
            string pathToTest    = "ONEPATH";
            bool   result        = StringLib.IsTheSameFilesystemPath(pathReference, pathToTest, false);

            Assert.IsTrue(result);
        }