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
public class ElseIfStatementConversionTestFixture
14
string csharp = "class Foo\r\n" +
16
" public int GetCount(i)\r\n" +
18
" if (i == 0) {\r\n" +
20
" } else if (i < 1) {\r\n" +
28
public void ConvertedRubyCode()
30
NRefactoryToRubyConverter converter = new NRefactoryToRubyConverter(SupportedLanguage.CSharp);
31
converter.IndentString = " ";
32
string Ruby = converter.Convert(csharp);
33
string expectedRuby = "class Foo\r\n" +
34
" def GetCount(i)\r\n" +
35
" if i == 0 then\r\n" +
37
" elsif i < 1 then\r\n" +
44
Assert.AreEqual(expectedRuby, Ruby);