PhunCmsRenderBundles() private method

private PhunCmsRenderBundles ( bool includeJquery = true, bool includeJqueryui = true, bool includeBackbone = true, bool includeCkEditor = true, bool includeEditorInit = true ) : string
includeJquery bool
includeJqueryui bool
includeBackbone bool
includeCkEditor bool
includeEditorInit bool
return string
コード例 #1
0
        public void TestRenderBundlesDoesNotRenderEditorInitialize()
        {
            // Arrange
            var rvf = new ResourcePathUtility();
            rvf.Config = new PhunCmsConfigurationSection() { ResourceRoute = "BogusRoute" };
            var expected = @"<script type=""text/javascript"" src=""/BogusRoute/scripts/jquery.js""></script>";

            // Act
            var result = rvf.PhunCmsRenderBundles(includeEditorInit: false);

            // Assert
            Assert.IsTrue(result.Contains(expected));
            Assert.IsFalse(result.Contains("PhunCms.initEditor()"));
        }
コード例 #2
0
        public void TestRenderBundlesWithNoParametersReturnValidPath()
        {
            // Arrange
            var rvf = new ResourcePathUtility();
            rvf.Config = new PhunCmsConfigurationSection() { ResourceRoute = "BogusRoute" };
            var expected = @"<script type=""text/javascript"" src=""/BogusRoute/scripts/jquery.js""></script>";

            // Act
            var result = rvf.PhunCmsRenderBundles();

            // Assert
            Assert.IsTrue(result.Contains(expected));
            Assert.IsTrue(result.Contains("PhunCms.initEditor()"));
        }