Exemple #1
0
        public void RegexNotMatchTest()
        {
            var service = new SimpleThumbnailService(@"http://example.com/(.+)", @"http://img.example.com/\1");

            var thumbinfo = service.GetThumbnailInfo("http://hogehoge.com/abcd", null);

            Assert.That(thumbinfo, Is.Null);
        }
        public void RegexNotMatchTest()
        {
            var service = new SimpleThumbnailService(@"http://example.com/(.+)", @"http://img.example.com/\1");

            var thumbinfo = service.GetThumbnailInfo("http://hogehoge.com/abcd", null);

            Assert.Null(thumbinfo);
        }
Exemple #3
0
        public void RegexMatchTest()
        {
            var service = new SimpleThumbnailService(@"http://example.com/(.+)", @"http://img.example.com/$1");

            var thumbinfo = service.GetThumbnailInfo("http://example.com/abcd", null);

            Assert.That(thumbinfo, Is.Not.Null);
            Assert.That(thumbinfo.ImageUrl, Is.EqualTo("http://example.com/abcd"));
            Assert.That(thumbinfo.ThumbnailUrl, Is.EqualTo("http://img.example.com/abcd"));
            Assert.That(thumbinfo.TooltipText, Is.Null);
        }
        public void RegexMatchTest()
        {
            var service = new SimpleThumbnailService(@"http://example.com/(.+)", @"http://img.example.com/$1");

            var thumbinfo = service.GetThumbnailInfo("http://example.com/abcd", null);

            Assert.NotNull(thumbinfo);
            Assert.Equal("http://example.com/abcd", thumbinfo.ImageUrl);
            Assert.Equal("http://img.example.com/abcd", thumbinfo.ThumbnailUrl);
            Assert.Null(thumbinfo.TooltipText);
        }