ICSharpCode.NRefactory.CSharp.CSharpOutputVisitorTests.AssertOutput C# (CSharp) Method

AssertOutput() private method

private AssertOutput ( string expected, AstNode node, CSharpFormattingOptions policy = null ) : void
expected string
node AstNode
policy CSharpFormattingOptions
return void
		void AssertOutput(string expected, AstNode node, CSharpFormattingOptions policy = null)
		{
			if (policy == null)
				policy = FormattingOptionsFactory.CreateMono();
			StringWriter w = new StringWriter();
			w.NewLine = "\n";
			node.AcceptVisitor(new CSharpOutputVisitor(new TextWriterTokenWriter(w) { IndentationString = "$" }, policy));
			Assert.AreEqual(expected.Replace("\r", ""), w.ToString());
		}