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); }
public void Dispose() { InMemoryFileManager.ClearFiles(); }