public void ReplaceEmbeddedCodeBlocks_Properly_Reformats_Code_Blocks() { var inputText = $"{WebFormsCodeBlockStartTag} {NormalExpressionContent} {WebFormsNormalEndTag}"; var expectedOutput = $"{RazorCodeBlockStartTag} {NormalExpressionContent} {RazorCodeBlockEndTag}"; var actualOutput = EmbeddedCodeReplacers.ReplaceEmbeddedCodeBlocks(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); }