Пример #1
0
        public async Task CanClearFiles()
        {
            var inMemoryFileManager = new InMemoryFileManager();

            using (var originalMemStream = new MemoryStream(new byte[] { 1, 2, 3, 4, 5 }))
            {
                await inMemoryFileManager.SaveFileAsync(Guid.NewGuid(), "my-container", "file.bin", originalMemStream);
            }

            Assert.Single(InMemoryFileManager.SavedFiles);
            InMemoryFileManager.ClearFiles();
            Assert.Empty(InMemoryFileManager.SavedFiles);
        }
Пример #2
0
 public void Dispose()
 {
     InMemoryFileManager.ClearFiles();
 }