Esempio n. 1
0
 public void SetUp()
 {
     _goodDir1 = new TestDirectory();
     _goodDir2 = new TestDirectory();
     Assume.That(_goodDir1.Directory, Is.Not.EqualTo(_goodDir2.Directory), "The two good directories are the same");
     Assume.That(BAD_DIRECTORY, Does.Not.Exist, BAD_DIRECTORY + " exists");
 }
Esempio n. 2
0
 public void EmptyDirectory()
 {
     using (var testDir = new TestDirectory())
     {
         Assert.That(testDir.Directory, Is.Empty);
     }
 }
Esempio n. 3
0
 public void NotEmptyDirectory()
 {
     using (var testDir = new TestDirectory())
     {
         var stream = File.Create(Path.Combine(testDir.Directory.FullName, "DUMMY.FILE"));
         stream.Close();
         Assert.That(testDir.Directory, Is.Not.Empty);
     }
 }
Esempio n. 4
0
        public void NotEmptyDirectory()
        {
            using (var testDir = new TestDirectory())
            {
                var stream = File.Create(Path.Combine(testDir.Directory.FullName, "DUMMY.FILE"));
#if NETSTANDARD1_6
                stream.Dispose();
#else
                stream.Close();
#endif
                Assert.That(testDir.Directory, Is.Not.Empty);
            }
        }
 public void SetUp()
 {
     _constraint = new FileOrDirectoryExistsConstraint();
     _goodDir = new TestDirectory();
     Assume.That(BAD_DIRECTORY, Does.Not.Exist, BAD_DIRECTORY + " exists");
 }