public void PutFileTest() { FilesRepository repository = new FilesRepository(); var filePath = Path.GetTempPath() + Guid.NewGuid().ToString() + ".xls"; var file = File.Create(filePath); file.Write(new byte[] { 5 }, 0, 1); file.Flush(); file.Close(); var fi = repository.PutFile(filePath); Assert.AreEqual(".xls", fi.Extension); }
public void GetListFielsTest() { FilesRepository repository = new FilesRepository(); var filePath = Path.GetTempPath() + Guid.NewGuid().ToString() + ".xls"; var file = File.Create(filePath); file.Write(new byte[] { 15, 12 }, 0, 2); file.Flush(); file.Close(); repository.PutFile(filePath); var fi = repository.GetListFiels(); Assert.AreNotEqual(null, fi); }