void TestIntegrateTemporaryVariable (string inputString, string outputString)
		{
			IntegrateTemporaryVariableRefactoring refactoring = new IntegrateTemporaryVariableRefactoring ();
			RefactoringOptions options = ExtractMethodTests.CreateRefactoringOptions (inputString);
			List<Change> changes = refactoring.PerformChanges (options, null);
			string output = ExtractMethodTests.GetOutput (options, changes);
			Assert.IsTrue (ExtractMethodTests.CompareSource (output, outputString), "Expected:" + Environment.NewLine + outputString + Environment.NewLine + "was:" + Environment.NewLine + output);
		}
Exemplo n.º 2
0
        protected override void Run(RefactoringOptions options)
        {
            IntegrateTemporaryVariableRefactoring integrateTemporaryVariableRefactoring = new IntegrateTemporaryVariableRefactoring();

            if (integrateTemporaryVariableRefactoring.IsValid(options))
            {
                integrateTemporaryVariableRefactoring.Run(options);
            }
        }
		protected override void Run (RefactoringOptions options)
		{
			IntegrateTemporaryVariableRefactoring integrateTemporaryVariableRefactoring = new IntegrateTemporaryVariableRefactoring ();
			if (integrateTemporaryVariableRefactoring.IsValid (options))
				integrateTemporaryVariableRefactoring.Run (options);
		}