Esempio n. 1
0
 public void CreateUniqueFileName()
 {
     using (var tempFileCollection = new TempFileCollection(Path.GetTempPath()))
     {
         var first  = tempFileCollection.CreateUniqueFileName();
         var second = tempFileCollection.CreateUniqueFileName();
         Assert.NotEqual(first, second);
     }
 }
Esempio n. 2
0
 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);
     }
 }