protected static void TestWrongContext (IContextAction action, string input) { var context = new TestRefactoringContext (input); if (!action.IsValid (context)) Console.WriteLine ("invalid node is:" + context.GetNode ()); Assert.IsTrue (!action.IsValid (context), action.GetType () + " shouldn't be valid there."); }
protected static string RunContextAction(IContextAction action, string input) { var context = new TestRefactoringContext (input); if (!action.IsValid (context)) Console.WriteLine ("invalid node is:" + context.GetNode ()); Assert.IsTrue (action.IsValid (context), action.GetType () + " is invalid."); action.Run (context); return context.doc.Text; }