public void PermitionsCheckerRenamerWithNullFile() { FileRenamer baseRenamer = new FileRenamer(); FileRenamerPermitionsChecker renamer = new FileRenamerPermitionsChecker(baseRenamer, new PermitionsChecker()); renamer.Rename(null); }
public void PermitionsCheckerRenamerSuccessful() { FileRenamer baseRenamer = new FileRenamer(); FileRenamerPermitionsChecker renamer = new FileRenamerPermitionsChecker(baseRenamer, new PermitionsChecker(), Permitions.Administrator); MP3File file = new MP3File("test.mp3"); file.FilePermitions = Permitions.Guest; renamer.Rename(file); Assert.AreEqual("test_(new).mp3", file.Path); }