示例#1
0
        public void TestLazyLoadToImgTagExistLoading()
        {
            const string html   = @"<p>Work 996 and have some fu bao!</p><img loading=""lazy"" src=""icu.jpg"" /><video src=""java996.mp4""></video>";
            var          result = PostService.AddLazyLoadToImgTag(html);

            Assert.IsTrue(result == @"<p>Work 996 and have some fu bao!</p><img loading=""lazy"" src=""icu.jpg"" /><video src=""java996.mp4""></video>");
        }
示例#2
0
        public void TestLazyLoadToImgTagEmpty()
        {
            var result = PostService.AddLazyLoadToImgTag(string.Empty);

            Assert.IsTrue(result == string.Empty);
        }