1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using ICSharpCode.NRefactory;
6
using ICSharpCode.RubyBinding;
9
namespace RubyBinding.Tests.Converter
12
/// Tests that C# code that creates a new XmlDocument object
13
/// is converted to Ruby correctly.
16
public class ObjectCreationTestFixture
18
string csharp = "class Foo\r\n" +
22
" XmlDocument doc = new XmlDocument();\r\n" +
23
" doc.LoadXml(\"<root/>\");\r\n" +
28
public void ConvertedRubyCode()
32
" def initialize()\r\n" +
33
" doc = XmlDocument.new()\r\n" +
34
" doc.LoadXml(\"<root/>\")\r\n" +
38
NRefactoryToRubyConverter converter = new NRefactoryToRubyConverter(SupportedLanguage.CSharp);
39
converter.IndentString = " ";
40
string Ruby = converter.Convert(csharp);
42
Assert.AreEqual(expectedRuby, Ruby);