public void DownloadOptionsWithZeroMaxWidthTest()
        {
            var options = new DownloadMediaOptions();

            TestDelegate action    = () => options.SetMaxWidth(0);
            var          exception = Assert.Throws <ArgumentException>(action);

            Assert.True(exception.Message.Contains("maxWidth must be > 0"));
        }
        public void CorrectDownloadOptionsWithScaleAndMaxWidthTest()
        {
            var options = new DownloadMediaOptions();

            options.SetScale(3.0005f);
            options.SetMaxWidth(10);


            string       result   = this.builder.BuildUrlStringForPath("~/media/1", options);
            const string Expected = "http://test.host/~/media/1.ashx?mw=10&sc=3.0005&db=web&la=en";

            Assert.AreEqual(Expected, result);
        }
        public void CorrectDownloadOptionsWithAllParamsTest()
        {
            var options = new DownloadMediaOptions();

            options.SetWidth(10);
            options.SetHeight(10);
            options.SetBackgroundColor("3F0000");
            options.SetAllowStrech(false);
            options.SetDisableMediaCache(false);
            options.SetDisplayAsThumbnail(true);
            options.SetMaxHeight(10);
            options.SetMaxWidth(10);
            options.SetScale(2.5f);

            string       result   = this.builder.BuildUrlStringForPath("~/media/1.png", options);
            const string expected = "http://test.host/~/media/1.png?w=10&h=10&mw=10&mh=10&bc=3f0000&dmc=0&as=0&sc=2.5&thn=1&db=web&la=en";

            Assert.AreEqual(expected, result);
        }