public void FailsWhenIgnoreDirectoriesIsTrueWithDirectoryInfo()
        {
            var constraint = new FileOrDirectoryExistsConstraint().IgnoreDirectories;
            var ex         = Assert.Throws <ArgumentException>(() => constraint.ApplyTo(_goodDir.Directory));

            Assert.That(ex.Message, Does.StartWith("The actual value must be a string or FileInfo"));
        }
 public void FailsWhenIgnoreFilesIsTrueWithFileString()
 {
     using (var tf = new TestFile(RESOURCE_FILE))
     {
         var constraint = new FileOrDirectoryExistsConstraint().IgnoreFiles;
         Assert.That(constraint.ApplyTo(tf.File.FullName).Status == ConstraintStatus.Failure);
     }
 }
 public void FailsWhenIgnoreFilesIsTrueWithFileInfo()
 {
     using (var tf = new TestFile(RESOURCE_FILE))
     {
         var constraint = new FileOrDirectoryExistsConstraint().IgnoreFiles;
         var ex         = Assert.Throws <ArgumentException>(() => constraint.ApplyTo(tf.File));
         Assert.That(ex.Message, Does.StartWith("The actual value must be a string or DirectoryInfo"));
     }
 }
        public void FailsWhenIgnoreDirectoriesIsTrueWithDirectoryString()
        {
            var constraint = new FileOrDirectoryExistsConstraint().IgnoreDirectories;

            Assert.That(constraint.ApplyTo(_goodDir.ToString()).Status == ConstraintStatus.Failure);
        }
 public void PassesWhenFileInfoExists()
 {
     using (var actualTestFile = new TestFile(RESOURCE_FILE))
     {
         Assert.That(_constraint.ApplyTo(actualTestFile.File).IsSuccess);
         Assert.That(actualTestFile.File, Does.Exist);
     }
 }