#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.
 
 
 
 
 
 

39 lines
1.1 KiB

// <file>
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
// <license see="prj:///doc/license.txt">GNU General Public License</license>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using NUnit.Framework;
namespace NRefactoryToBooConverter.Tests
{
[TestFixture]
public class ComplexTests : TestHelper
{
[Test]
public void MovingLocals()
{
TestInClass("public void Run() { if (a) { int b = 1; } else { int b = 2; } }",
"public final def Run() as System.Void:\n" +
"\tb as System.Int32\n" +
"\tif a:\n" +
"\t\tb = 1\n" +
"\telse:\n" +
"\t\tb = 2");
}
[Test]
public void RenamingLocals()
{
TestInClass("public void Run() { if (a) { int b = 1; } else { double b = 2; } }",
"public final def Run() as System.Void:\n" +
"\tif a:\n" +
"\t\tb as System.Int32 = 1\n" +
"\telse:\n" +
"\t\tb__2 as System.Double = 2");
}
}
}