public async Task ResizeOverlayImageLarge_null_exception() { var overlayImage = new OverlayImage(_selectorStorage, new AppSettings()); await overlayImage.ResizeOverlayImageLarge(null, null, new AppSettingsPublishProfiles()); // > ArgumentNullException }
public async Task ResizeOverlayImageLarge_overlay_image_missing() { var overlayImage = new OverlayImage(_selectorStorage, new AppSettings { ThumbnailTempFolder = "/" }); await overlayImage.ResizeOverlayImageLarge("/test.jpg", "/out.jpg", new AppSettingsPublishProfiles { SourceMaxWidth = 100, OverlayMaxWidth = 1 }); // > overlay image missing }
public async Task ResizeOverlayImageLarge_Done() { var overlayImage = new OverlayImage(_selectorStorage, new AppSettings { ThumbnailTempFolder = "/" }); await overlayImage.ResizeOverlayImageLarge("/test.jpg", "/out_large.jpg", new AppSettingsPublishProfiles { SourceMaxWidth = 100, OverlayMaxWidth = 1, Path = "/test.jpg" }); Assert.IsTrue(_storage.ExistFile("/out_large.jpg")); }
public async Task ResizeOverlayImageLarge_File_Not_Found() { var overlayImage = new OverlayImage(_selectorStorage, new AppSettings { ThumbnailTempFolder = "/" }); await overlayImage.ResizeOverlayImageLarge("non-exist.jpg", "/out.jpg", new AppSettingsPublishProfiles { SourceMaxWidth = 100, OverlayMaxWidth = 1 }); // itemFileHash not found }
public async Task ResizeOverlayImageLarge_Ignore_If_Exist() { var overlayImage = new OverlayImage(_selectorStorage, new AppSettings { ThumbnailTempFolder = "/" }); await overlayImage.ResizeOverlayImageLarge("/test.jpg", "/test.jpg", new AppSettingsPublishProfiles { SourceMaxWidth = 100, OverlayMaxWidth = 1, Path = "/test.jpg" }); // Should return nothing Assert.IsTrue(_storage.ExistFile("/test.jpg")); }