Beispiel #1
0
		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.");
		}
Beispiel #2
0
        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;
        }
Beispiel #4
0
        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);
        }