public async Task RegexNotMatchTest() { var service = new SimpleThumbnailService(@"http://example.com/(.+)", @"http://img.example.com/\1"); var thumbinfo = await service.GetThumbnailInfoAsync("http://hogehoge.com/abcd", null, CancellationToken.None); Assert.Null(thumbinfo); }
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); }
public async Task RegexMatchTest() { var service = new SimpleThumbnailService(@"http://example.com/(.+)", @"http://img.example.com/$1"); var thumbinfo = await service.GetThumbnailInfoAsync("http://example.com/abcd", null, CancellationToken.None); Assert.NotNull(thumbinfo); Assert.Equal("http://example.com/abcd", thumbinfo.ImageUrl); Assert.Equal("http://img.example.com/abcd", thumbinfo.ThumbnailUrl); Assert.Null(thumbinfo.TooltipText); }
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); }