Exemplo n.º 1
0
		void TestDeclareLocal (string inputString, string outputString)
		{
			DeclareLocalCodeGenerator refactoring = new DeclareLocalCodeGenerator ();
			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
        void TestDeclareLocal(string inputString, string outputString)
        {
            DeclareLocalCodeGenerator refactoring = new DeclareLocalCodeGenerator();
            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.º 3
0
		protected override void Run (RefactoringOptions options)
		{
			DeclareLocalCodeGenerator codeGenerator = new DeclareLocalCodeGenerator ();
			if (codeGenerator.IsValid (options)) 
				codeGenerator.Run (options);
		}