예제 #1
0
        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);

        }
예제 #2
0
        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);

        }