Example #1
0
 public void UrlStartsWithApplicationVirtualDirectory()
 {
     var app = new UrlGenerator("/");
     var url = app.CreateModuleUrl(StubScriptModule("~/test"));
     url.ShouldStartWith("/");
 }
Example #2
0
 public void Inserts_assetsPrefix()
 {
     var app = new UrlGenerator("/");
     var url = app.CreateModuleUrl(StubScriptModule("~/test"));
     url.ShouldStartWith("/_assets/");
 }
Example #3
0
 public void InsertsModuleDirectoryWithBackSlashesConvertedToForwardSlashes()
 {
     var app = new UrlGenerator("/");
     var url = app.CreateModuleUrl(StubScriptModule("~\\test\\foo\\bar"));
     url.ShouldStartWith("/_assets/scripts/test/foo/bar");
 }
Example #4
0
 public void InsertsLowercasedPluralisedStylesheetModuleTypeName()
 {
     var app = new UrlGenerator("/");
     var url = app.CreateModuleUrl(StubStylesheetModule("~/test"));
     url.ShouldStartWith("/_assets/stylesheets/");
 }
Example #5
0
 public void AppendsSlashToVirtualDirectoryWhenMissingFromEnd()
 {
     var app = new UrlGenerator("/myapp");
     var url = app.CreateModuleUrl(StubScriptModule("~/test"));
     url.ShouldStartWith("/myapp/");
 }
Example #6
0
 public void AppendsModuleHashHexString()
 {
     var app = new UrlGenerator("/");
     var url = app.CreateModuleUrl(StubScriptModule("~\\test\\foo\\bar"));
     url.ShouldEqual("/_assets/scripts/test/foo/bar_010203");
 }