示例#1
0
 public void AreNotEqualFailsWithStringPath()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory"))
     {
         DirectoryAssert.AreNotEqual(td.directoryName, td.directoryName);
     }
 }
示例#2
0
 public void AreNotEqualPassesIfOneIsNull()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory"))
     {
         DirectoryAssert.AreNotEqual(td.directoryInformation, null);
     }
 }
示例#3
0
 public void AreNotEqualFailsWithDirectoryInfos()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory"))
     {
         DirectoryAssert.AreNotEqual(td.directoryInformation, td.directoryInformation);
     }
 }
        public void AreNotEqualPassesWithDirectoryInfos()
        {
            var expected = _goodDir1.Directory;
            var actual   = _goodDir2.Directory;

            DirectoryAssert.AreNotEqual(expected, actual);
        }
示例#5
0
 public void AreNotEqualPassesWhenOneDoesNotExist()
 {
     using (TestDirectory td = new TestDirectory("ParentDirectory"))
     {
         DirectoryInfo actual = new DirectoryInfo("NotExistingDirectoryName");
         DirectoryAssert.AreNotEqual(td.directoryInformation, actual);
     }
 }
示例#6
0
        public void DirectoryAssertsTest()
        {
            DirectoryInfo dirInfo1 = new DirectoryInfo(@"D:\development\Folder1");
            DirectoryInfo dirInfo2 = new DirectoryInfo(@"D:\development\Folder2");

            DirectoryAssert.AreNotEqual(dirInfo1, dirInfo2);
            DirectoryAssert.Exists(dirInfo1);
        }
示例#7
0
        public void AreNotEqualFailsWhenBothAreNull()
        {
            DirectoryInfo expected = null;
            DirectoryInfo actual   = null;

            expectedMessage =
                "  Expected: not null" + Environment.NewLine +
                "  But was:  null" + Environment.NewLine;
            DirectoryAssert.AreNotEqual(expected, actual);
        }
示例#8
0
 public void AreNotEqualPassesWithStringPath()
 {
     using (TestDirectory td1 = new TestDirectory("ParentDirectory1"))
     {
         using (TestDirectory td2 = new TestDirectory("ParentDirectory2"))
         {
             DirectoryAssert.AreNotEqual(td1.directoryName, td2.directoryName);
         }
     }
 }
示例#9
0
 public void AreNotEqualPassesWithDirectoryInfos()
 {
     using (TestDirectory td1 = new TestDirectory("ParentDirectory1"))
     {
         using (TestDirectory td2 = new TestDirectory("ParentDirectory2"))
         {
             DirectoryAssert.AreNotEqual(td1.directoryInformation, td2.directoryInformation);
         }
     }
 }
        public void AreNotEqualFailsWithDirectoryInfos()
        {
            var expected        = new DirectoryInfo(_goodDir1.ToString());
            var actual          = new DirectoryInfo(_goodDir1.ToString());
            var expectedMessage = string.Format(
                "  Expected: not equal to <{0}>{2}  But was:  <{1}>{2}",
                expected.FullName,
                actual.FullName,
                Environment.NewLine);
            var ex = Assert.Throws <AssertionException>(() => DirectoryAssert.AreNotEqual(expected, actual));

            Assert.That(ex.Message, Is.EqualTo(expectedMessage));
        }
 public void AreNotEqualPassesIfActualIsNull()
 {
     DirectoryAssert.AreNotEqual(null, _goodDir1.Directory);
 }
 public void AreNotEqualPassesIfExpectedIsNull()
 {
     DirectoryAssert.AreNotEqual(_goodDir1.Directory, null);
 }