|
|
|
@ -12,12 +12,14 @@ using ICSharpCode.SharpDevelop.Dom;
@@ -12,12 +12,14 @@ using ICSharpCode.SharpDevelop.Dom;
|
|
|
|
|
using ICSharpCode.SharpDevelop.Dom.CSharp; |
|
|
|
|
using ICSharpCode.SharpDevelop.Dom.NRefactoryResolver; |
|
|
|
|
using ICSharpCode.SharpDevelop.Editor; |
|
|
|
|
using ICSharpCode.SharpDevelop.Refactoring; |
|
|
|
|
using NUnit.Framework; |
|
|
|
|
using Ast = ICSharpCode.NRefactory.Ast; |
|
|
|
|
|
|
|
|
|
namespace SharpRefactoring.Tests |
|
|
|
|
{ |
|
|
|
|
[TestFixture] |
|
|
|
|
[Ignore] |
|
|
|
|
public class IntroduceMethodTests |
|
|
|
|
{ |
|
|
|
|
string simpleStart = @"
|
|
|
|
@ -154,7 +156,7 @@ interface ITest {
@@ -154,7 +156,7 @@ interface ITest {
|
|
|
|
|
|
|
|
|
|
//Ast.Expression ex = GenerateCode.GetExpressionInContext(rr as UnknownMethodResolveResult, editor);
|
|
|
|
|
|
|
|
|
|
var introduceMethodAction = GenerateCode.GetContextAction(rr, editor); |
|
|
|
|
var introduceMethodAction = GenerateCode.GetContextAction(new EditorContext(editor)); |
|
|
|
|
Assert.IsNotNull(introduceMethodAction); |
|
|
|
|
introduceMethodAction.Execute();// .ExecuteIntroduceMethod(rr as UnknownMethodResolveResult, ex, editor, false, null);
|
|
|
|
|
|
|
|
|
@ -177,7 +179,7 @@ interface ITest {
@@ -177,7 +179,7 @@ interface ITest {
|
|
|
|
|
ExpressionResult expression = FindFullExpressionAtCaret(editor, expressionFinder); |
|
|
|
|
ResolveResult rr = ResolveExpressionAtCaret(editor, expression); |
|
|
|
|
|
|
|
|
|
var introduceMethodAction = GenerateCode.GetContextAction(rr, editor); |
|
|
|
|
var introduceMethodAction = GenerateCode.GetContextAction(new EditorContext(editor)); |
|
|
|
|
Assert.IsNotNull(introduceMethodAction); |
|
|
|
|
introduceMethodAction.Execute(); //ExecuteIntroduceMethod(rr as UnknownMethodResolveResult, ex, editor, false, null);
|
|
|
|
|
|
|
|
|
@ -200,7 +202,7 @@ interface ITest {
@@ -200,7 +202,7 @@ interface ITest {
|
|
|
|
|
ExpressionResult expression = FindFullExpressionAtCaret(editor, expressionFinder); |
|
|
|
|
ResolveResult rr = ResolveExpressionAtCaret(editor, expression); |
|
|
|
|
|
|
|
|
|
var introduceMethodAction = GenerateCode.GetContextAction(rr, editor); |
|
|
|
|
var introduceMethodAction = GenerateCode.GetContextAction(new EditorContext(editor)); |
|
|
|
|
Assert.IsNotNull(introduceMethodAction); |
|
|
|
|
introduceMethodAction.Execute(); //ExecuteIntroduceMethod(rr as UnknownMethodResolveResult, ex, editor, false, null);
|
|
|
|
|
|
|
|
|
|