Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 public void SingleFile()
 {
     var path1 = new NPath("myfile");
     var path2 = new NPath("myfile");
     Assert.IsTrue(path1.Equals(path2));
     Assert.IsTrue(path1 == path2);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 6
0
        public void SingleFile()
        {
            var path1 = new NPath("myfile");
            var path2 = new NPath("myfile");

            Assert.IsTrue(path1.Equals(path2));
            Assert.IsTrue(path1 == path2);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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());
        }