BuildCdnIncludeString() публичный Метод

This creates the CDN html include string using the properties in the json bundle object
public BuildCdnIncludeString ( string cdnHtmlFormatString, string httpFileUrl, Func getChecksumOfProductionFile ) : string
cdnHtmlFormatString string
httpFileUrl string the fully qualified path to the file
getChecksumOfProductionFile Func
Результат string
Пример #1
0
        public void TestBuildCdnIncludeOk()
        {
            //SETUP
            var jObject = JObject.Parse(@"{
              ""development"": ""lib/jquery/dist/jquery.js"",
              ""production"": ""jquery.min.js"",
              ""cdnUrl"": ""https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js"",
              ""cdnSuccessTest"": ""window.jQuery""
            }");
            var cdn = new CdnInfo("Unit Test", jObject);

            //ATTEMPT
            var html =
                cdn.BuildCdnIncludeString( JsCdnHtmlInclude, "http:localhost:1234/js/jquery.min.js", () => "123");

            //VERIFY
            html.ShouldEqual("<script src='https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js'></script><script>window.jQuery||document.write(\"\\x3Cscript src='http:localhost:1234/js/jquery.min.js?v=123'>\\x3C/script>\")</script>");
        }