#develop (short for SharpDevelop) is a free IDE for .NET programming languages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.3 KiB

// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using ICSharpCode.NRefactory;
using ICSharpCode.RubyBinding;
using NUnit.Framework;
namespace RubyBinding.Tests.Converter
{
[TestFixture]
public class VBStringConcatTestFixture
{
string vb = "Namespace DefaultNamespace\r\n" +
" Public Class Class1\r\n" +
" Public Sub Test\r\n" +
" Dim a as String\r\n" +
" a = \"test\" & \" this\"\r\n" +
" End Sub\r\n" +
" End Class\r\n" +
"End Namespace";
[Test]
public void GeneratedRubySourceCode()
{
NRefactoryToRubyConverter converter = new NRefactoryToRubyConverter(SupportedLanguage.VBNet);
converter.IndentString = " ";
string Ruby = converter.Convert(vb);
string expectedRuby =
"module DefaultNamespace\r\n" +
" class Class1\r\n" +
" def Test()\r\n" +
" a = \"test\" + \" this\"\r\n" +
" end\r\n" +
" end\r\n" +
"end";
Assert.AreEqual(expectedRuby, Ruby);
}
}
}