public void CanDeleteNonExistentFile() { Assert.IsFalse(File.Exists(NoExistsPath)); var no = new SpecialFile(NoExistsPath); no.Delete(); Assert.DoesNotThrow(() => no.Delete()); }
public void CanDeleteReadOnlyFile() { var path = NoPermsPath; Assert.IsTrue(File.Exists(path)); var file = new SpecialFile(path); Assert.DoesNotThrow(() => file.Delete()); Assert.IsTrue(File.Exists(path)); }
public void CanDeleteRegularFile() { var path = ExistsPath; Assert.IsTrue(File.Exists(path)); var file = new SpecialFile(path); Assert.DoesNotThrow(() => file.Delete()); Assert.IsFalse(File.Exists(path)); }