Exemplo n.º 1
0
        public void ThumborVerticalAlignIgnoreFirst(Thumbor.ImageVerticalAlign firstAlign, Thumbor.ImageVerticalAlign secondAlign)
        {
            var thumbor    = new Thumbor("http://localhost/");
            var resizedUrl = thumbor.BuildImage("http://localhost/image.jpg")
                             .VerticalAlign(firstAlign)
                             .VerticalAlign(secondAlign)
                             .ToFullUrl();

            resizedUrl.Should().Be(string.Format("http://localhost/unsafe/{0}http://localhost/image.jpg", secondAlign == Thumbor.ImageVerticalAlign.Middle ? string.Empty : secondAlign.ToString().ToLower() + "/"));
        }
Exemplo n.º 2
0
        public void ThumborVerticalAlign(Thumbor.ImageVerticalAlign align)
        {
            var thumbor    = new Thumbor("http://localhost/");
            var resizedUrl = thumbor.BuildImage("http://localhost/image.jpg")
                             .VerticalAlign(align)
                             .ToFullUrl();

            resizedUrl.Should().Be(string.Format("http://localhost/unsafe/{0}/http://localhost/image.jpg", align.ToString().ToLower()));
        }