public async Task FileStorageGetCustomExtensionFromMimeType() { var downloader = new MimeTyper(true, MimeTyperLoadMode.File); await downloader.AddCustomMimeType(new MimeTyperItem { Extension = "purple", MimeType = "application/purplesoft-io" }); var ext = await downloader.GetExtensionFromMimeType("application/purplesoft-io"); Assert.Equal("purple", ext); }
public async Task GetMimeTypeFromCustomExtension() { var downloader = new MimeTyper(); await downloader.AddCustomMimeType(new MimeTyperItem { Extension = "purple", MimeType = "application/purplesoft-io" }); var ext = await downloader.GetMimeTypeFromExtension("logo-finaleaaa.purple"); Assert.Equal("application/purplesoft-io", ext); }