Exemple #1
0
 public void WithDifferentDriveLetters()
 {
     var path1 = new NPath(@"c:\mydir\myfile");
     var path2 = new NPath(@"e:\mydir\myfile");
     Assert.IsFalse(path1.Equals(path2));
     Assert.IsFalse(path1 == path2);
 }
Exemple #2
0
 public void SingleFile()
 {
     var path1 = new NPath("myfile");
     var path2 = new NPath("myfile");
     Assert.IsTrue(path1.Equals(path2));
     Assert.IsTrue(path1 == path2);
 }
Exemple #3
0
 public void OneWithTrailingSlash()
 {
     var path1 = new NPath(@"mydir/mydir2");
     var path2 = new NPath(@"mydir/mydir2/");
     Assert.IsTrue(path1.Equals(path2));
     Assert.IsTrue(path1 == path2);
 }
Exemple #4
0
 public void OneRootedOneNonRooted()
 {
     var path1 = new NPath(@"\mydir\myfile");
     var path2 = new NPath(@"mydir\myfile");
     Assert.IsFalse(path1.Equals(path2));
     Assert.IsFalse(path1 == path2);
 }
Exemple #5
0
 public void InFolderButDifferentSlashes()
 {
     var path1 = new NPath(@"mydir/myfile");
     var path2 = new NPath(@"mydir\myfile");
     Assert.IsTrue(path1.Equals(path2));
     Assert.IsTrue(path1 == path2);
 }
Exemple #6
0
        public void SingleFile()
        {
            var path1 = new NPath("myfile");
            var path2 = new NPath("myfile");

            Assert.IsTrue(path1.Equals(path2));
            Assert.IsTrue(path1 == path2);
        }
Exemple #7
0
        public void OneWithTrailingSlash()
        {
            var path1 = new NPath(@"mydir/mydir2");
            var path2 = new NPath(@"mydir/mydir2/");

            Assert.IsTrue(path1.Equals(path2));
            Assert.IsTrue(path1 == path2);
        }
Exemple #8
0
        public void OneRootedOneNonRooted()
        {
            var path1 = new NPath(@"\mydir\myfile");
            var path2 = new NPath(@"mydir\myfile");

            Assert.IsFalse(path1.Equals(path2));
            Assert.IsFalse(path1 == path2);
        }
Exemple #9
0
        public void WithDifferentDriveLetters()
        {
            var path1 = new NPath(@"c:\mydir\myfile");
            var path2 = new NPath(@"e:\mydir\myfile");

            Assert.IsFalse(path1.Equals(path2));
            Assert.IsFalse(path1 == path2);
        }
Exemple #10
0
        public void InFolderButDifferentSlashes()
        {
            var path1 = new NPath(@"mydir/myfile");
            var path2 = new NPath(@"mydir\myfile");

            Assert.IsTrue(path1.Equals(path2));
            Assert.IsTrue(path1 == path2);
        }
Exemple #11
0
        public void SingleFile()
        {
            var path1 = new NPath("myfile");
            var path2 = new NPath("myfile");

            Assert.IsTrue(path1.Equals(path2));
            Assert.IsTrue(path1 == path2);
            Assert.AreEqual(path1.GetHashCode(), path2.GetHashCode());
        }
Exemple #12
0
        public void OneRootedOneNonRooted()
        {
            var path1 = new NPath(@"\mydir\myfile");
            var path2 = new NPath(@"mydir\myfile");

            Assert.IsFalse(path1.Equals(path2));
            Assert.IsFalse(path1 == path2);
            Assert.AreNotEqual(path1.GetHashCode(), path2.GetHashCode());
        }
Exemple #13
0
        public void WithDifferentDriveLetters()
        {
            var path1 = new NPath(@"c:\mydir\myfile");
            var path2 = new NPath(@"e:\mydir\myfile");

            Assert.IsFalse(path1.Equals(path2));
            Assert.IsFalse(path1 == path2);
            Assert.AreNotEqual(path1.GetHashCode(), path2.GetHashCode());
        }