private IShopManager GetTestShopManager() { var mock = new Mock <IShopManager>(); var opts = new ShopManagerOptions() { Image = new ImageOptions() { SaveFormat = ImageFormat.Jpeg, EncoderQuality = 80L, MaxWidth = 1000, MaxHeight = 1000, MaxThumbWidth = 150, MaxThumbHeight = 150, } }; mock.Setup(x => x.Options).Returns(opts); mock.Setup(x => x.ErrorDescriber).Returns(new OperationErrorDescriber()); return(mock.Object); }
public ShopImageTransformer(IOptions <ShopManagerOptions> optionsAccessor) { Options = optionsAccessor.Value ?? throw new ArgumentNullException(nameof(Options)); }