Beispiel #1
0
 public void RebaseDotDotRelativeUrlTest()
 {
     Assert.AreEqual("/images/bg.jpg", CssRewriteUrlTransform.RebaseUrlToAbsolute("/images", "../images/bg.jpg"));
     Assert.AreEqual("/images/bg.jpg", CssRewriteUrlTransform.RebaseUrlToAbsolute("/images/", "../images/bg.jpg"));
     // content/themes/foo.css => bundles/themes.css
     Assert.AreEqual("/content/images/bg.jpg", CssRewriteUrlTransform.RebaseUrlToAbsolute("/content/themes/", "../images/bg.jpg"));
     Assert.AreEqual("/content/images/bg.jpg", CssRewriteUrlTransform.RebaseUrlToAbsolute("/content/themes", "../images/bg.jpg"));
 }
Beispiel #2
0
 public void RebaseArgumentCheckingTests()
 {
     // i.e. moving css from /content/foo.css => /bundles/css
     Assert.AreEqual("foo", CssRewriteUrlTransform.RebaseUrlToAbsolute("  ", "foo"));
     Assert.AreEqual("foo", CssRewriteUrlTransform.RebaseUrlToAbsolute("", "foo"));
     Assert.AreEqual("foo", CssRewriteUrlTransform.RebaseUrlToAbsolute(null, "foo"));
     Assert.AreEqual(" ", CssRewriteUrlTransform.RebaseUrlToAbsolute("/content", " "));
     Assert.AreEqual("", CssRewriteUrlTransform.RebaseUrlToAbsolute("/content", ""));
     Assert.AreEqual(null, CssRewriteUrlTransform.RebaseUrlToAbsolute("/content", null));
 }
Beispiel #3
0
 public void RebaseBasicRelativeUrlTest()
 {
     // i.e. moving css from /content/foo.css => /bundles/css
     Assert.AreEqual("/content/images/bg.jpg", CssRewriteUrlTransform.RebaseUrlToAbsolute("/content", "images/bg.jpg"));
 }