Browse Source

Fixed bug in TestRefactoringContext that attempted to put fields inside properties

pull/32/merge
Luís Reis 13 years ago
parent
commit
e287bdb020
  1. 6
      ICSharpCode.NRefactory.Tests/CSharp/CodeActions/TestRefactoringContext.cs

6
ICSharpCode.NRefactory.Tests/CSharp/CodeActions/TestRefactoringContext.cs

@ -104,7 +104,11 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions @@ -104,7 +104,11 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
public override Task InsertWithCursor(string operation, InsertPosition defaultPosition, IEnumerable<AstNode> nodes)
{
var entity = context.GetNode<EntityDeclaration>();
EntityDeclaration entity = context.GetNode<EntityDeclaration>();
if (entity is Accessor) {
entity = (EntityDeclaration) entity.Parent;
}
foreach (var node in nodes) {
InsertBefore(entity, node);
}

Loading…
Cancel
Save