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"); }
public void EmptyDirectory() { using (var testDir = new TestDirectory()) { Assert.That(testDir.Directory, Is.Empty); } }
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); } }
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"); }