public void FixSnipSpacesTest() { var stuff = " public void yo()" + "\n sasdfsadf" + "\n asdfasdf\n" + " }"; string fixSnip = CodeSearchResultInstance.SourceToSnippet(stuff, CodeSearchResult.DefaultSnippetSize); Assert.IsTrue(fixSnip.Equals("public void yo()\n sasdfsadf\n asdfasdf\n}\n")); }
public void FixAnotherWeirdCase() { string fixSnip = CodeSearchResultInstance.SourceToSnippet(tab, CodeSearchResult.DefaultSnippetSize); Assert.IsTrue(fixSnip.Equals("protected virtual void Layout(bool continueLayout)\r\n" + "{\r\n" + " if (Graph == null || Graph.VertexCount == 0 || !LayoutAlgorithmFactory.IsValidAlg...\n" + " return; //no graph to layout, or wrong layout algorithm\r\n" + "}\r\n" )); }