diff options
author | Mike Krüger <mkrueger@novell.com> | 2011-01-26 16:38:45 +0300 |
---|---|---|
committer | Mike Krüger <mkrueger@novell.com> | 2011-01-26 16:38:45 +0300 |
commit | 18517942ddfd3842a74ce45c95991048d51b6d5b (patch) | |
tree | 549f1530f063e3c2be4c966dc3a61e2853ef62d9 /main/tests/UnitTests/MonoDevelop.Refactoring | |
parent | 7745cbfd417b3172dcbd0b99dd54f9eb88bb599d (diff) |
Added unit test for 'Bug 666271 - "Extract Method" on single line adds
two semi-colons in method, none in replaced text'.
Diffstat (limited to 'main/tests/UnitTests/MonoDevelop.Refactoring')
-rw-r--r-- | main/tests/UnitTests/MonoDevelop.Refactoring/ExtractMethodTests.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/main/tests/UnitTests/MonoDevelop.Refactoring/ExtractMethodTests.cs b/main/tests/UnitTests/MonoDevelop.Refactoring/ExtractMethodTests.cs index 5272218b52..3e2f39e240 100644 --- a/main/tests/UnitTests/MonoDevelop.Refactoring/ExtractMethodTests.cs +++ b/main/tests/UnitTests/MonoDevelop.Refactoring/ExtractMethodTests.cs @@ -438,6 +438,34 @@ namespace MonoDevelop.Refactoring.Tests "); } + /// <summary> + /// Bug 666271 - "Extract Method" on single line adds two semi-colons in method, none in replaced text + /// </summary> + [Test()] + public void TestBug666271 () + { + TestExtractMethod (@"class TestClass +{ + void TestMethod () + { + <-TestMethod ();-> + } +} +", @"class TestClass +{ + void TestMethod () + { + NewMethod (); + } + + void NewMethod () + { + TestMethod (); + } +} +"); + } + /* Currently not possible to implement, would cause serve bugs: [Test()] public void ExtractMethodMultiVariableWithLocalReturnVariableTest () |