public void ReplaceRawExprs_Properly_Reformats_Tag() { var inputText = $"{WebFormsRawExpressionStartTag} {NormalExpressionContent} {WebFormsNormalEndTag}"; var expectedOutput = $"{RazorExplicitBindingStartTag}new MarkupString({NormalExpressionContent}){RazorExplicitBindingEndTag}"; var actualOutput = EmbeddedCodeReplacers.ReplaceRawExprs(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); }