コード例 #1
0
        public void Does_GetWebPathForFile_Return_a_Valid_WebPath_For_A_Given_File()
        {
            var baseDir = new DirectoryInfo(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).Parent.Parent.FullName;

            string url = AngularTemplateHelper.GetWebPathForFile(baseDir, Path.Combine(baseDir, "app", "test.html"));

            Assert.AreEqual("/app/test.html", url);
        }
コード例 #2
0
        public void Does_RenderAngularTemplates_Work_With_Trailing_Slashes_On_Server_Root()
        {
            var baseDir = new DirectoryInfo(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).Parent.Parent.FullName;

            string html = AngularTemplateHelper.RenderAngularTemplates(baseDir + @"\", Path.Combine(baseDir, "app"));

            //  Assert.True(html.Contains("<script type=\"text/ng-template\" id=\"/app/subfolder1/test2.html\">"));
            //   Assert.True(html.Contains("<script type=\"text/ng-template\" id=\"/app/test.html\">"));
        }
コード例 #3
0
        public void Does_RenderAngularTemplates_Include_The_Body_Of_Html_Files()
        {
            var baseDir = new DirectoryInfo(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).Parent.Parent.FullName;

            string html = AngularTemplateHelper.RenderAngularTemplates(baseDir, Path.Combine(baseDir, "app"));

            Assert.True(html.Contains("<script type=\"text/ng-template\" id=\"/app/subfolder1/test2.html\">"));
            Assert.True(html.Contains("<script type=\"text/ng-template\" id=\"/app/test.html\">"));
        }