public void CreateUniqueFileName() { using (var tempFileCollection = new TempFileCollection(Path.GetTempPath())) { var first = tempFileCollection.CreateUniqueFileName(); var second = tempFileCollection.CreateUniqueFileName(); Assert.NotEqual(first, second); } }
public void CreateUniqueFileName_has_extension() { using (var tempFileCollection = new TempFileCollection(Path.GetTempPath())) { const string fileExtension = "txt"; var fileName = tempFileCollection.CreateUniqueFileName(fileExtension); Assert.EndsWith("." + fileExtension, fileName); } }