Ejemplo n.º 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"));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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"));
 }