public void ReplaceHTMLEncodedExprs_Properly_Reformats_Tag() { var inputText = $"{WebFormsHTMLEncodedExpressionStartTag} {NormalExpressionContent} {WebFormsNormalEndTag}"; var expectedOutput = $"{RazorExplicitBindingStartTag}{NormalExpressionContent}{RazorExplicitBindingEndTag}"; var actualOutput = EmbeddedCodeReplacers.ReplaceHTMLEncodedExprs(inputText); Assert.AreEqual(expectedOutput, actualOutput); }
public static string ConvertEmbeddedCode(string htmlString, string originalFilePath, ViewImportService viewImportService) { htmlString = EmbeddedCodeReplacers.ReplaceOneWayDataBinds(htmlString); htmlString = EmbeddedCodeReplacers.ReplaceRawExprs(htmlString); htmlString = EmbeddedCodeReplacers.ReplaceHTMLEncodedExprs(htmlString); htmlString = EmbeddedCodeReplacers.ReplaceAspExprs(htmlString); htmlString = EmbeddedCodeReplacers.ReplaceAspComments(htmlString); htmlString = EmbeddedCodeReplacers.ReplaceEmbeddedCodeBlocks(htmlString); return(htmlString); }