/** * This file is licensed under the University of Illinois/NCSA Open Source License. See LICENSE.TXT for details. */ package edu.illinois.codingspectator.ui.tests.extractmethod; import org.eclipse.jface.dialogs.IDialogConstants; import edu.illinois.codingspectator.ui.tests.RefactoringTest; public class T06 extends RefactoringTest { protected static final String EXTRACT_METHOD_MENU_ITEM_NAME= "Extract Method..."; private static final String SELECTION= "System.out.println(\"main\");"; private static final String METHOD_NAME= "extractedMethod"; @Override protected String getTestFileName() { return "ValidExtractMethodTestFile"; } @Override protected void doExecuteRefactoring() { bot.selectElementToRefactor(getTestFileFullName(), 8, 8, SELECTION.length()); bot.invokeRefactoringFromMenu(EXTRACT_METHOD_MENU_ITEM_NAME); bot.fillTextField("Method name:", METHOD_NAME); bot.clickButtons(IDialogConstants.OK_LABEL); } }