コード例 #1
0
ファイル: Equality.cs プロジェクト: liszto/NiceIO
 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);
 }
コード例 #2
0
ファイル: Equality.cs プロジェクト: liszto/NiceIO
 public void SingleFile()
 {
     var path1 = new NPath("myfile");
     var path2 = new NPath("myfile");
     Assert.IsTrue(path1.Equals(path2));
     Assert.IsTrue(path1 == path2);
 }
コード例 #3
0
ファイル: Equality.cs プロジェクト: liszto/NiceIO
 public void OneWithTrailingSlash()
 {
     var path1 = new NPath(@"mydir/mydir2");
     var path2 = new NPath(@"mydir/mydir2/");
     Assert.IsTrue(path1.Equals(path2));
     Assert.IsTrue(path1 == path2);
 }
コード例 #4
0
ファイル: Equality.cs プロジェクト: liszto/NiceIO
 public void OneRootedOneNonRooted()
 {
     var path1 = new NPath(@"\mydir\myfile");
     var path2 = new NPath(@"mydir\myfile");
     Assert.IsFalse(path1.Equals(path2));
     Assert.IsFalse(path1 == path2);
 }
コード例 #5
0
ファイル: Equality.cs プロジェクト: liszto/NiceIO
 public void InFolderButDifferentSlashes()
 {
     var path1 = new NPath(@"mydir/myfile");
     var path2 = new NPath(@"mydir\myfile");
     Assert.IsTrue(path1.Equals(path2));
     Assert.IsTrue(path1 == path2);
 }
コード例 #6
0
        public void SingleFile()
        {
            var path1 = new NPath("myfile");
            var path2 = new NPath("myfile");

            Assert.IsTrue(path1.Equals(path2));
            Assert.IsTrue(path1 == path2);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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());
        }
コード例 #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());
        }
コード例 #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());
        }