blob: 0f5286e721864f737dda7cdce6dca10ddcd80643 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2019, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.ui.tests.refactoring;
import static org.eclipse.jdt.ui.tests.refactoring.AbstractJunit4SelectionTestCase.TestMode.COMPARE_WITH_OUTPUT;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.ui.tests.CustomBaseRunner;
import org.eclipse.jdt.ui.tests.IgnoreInheritedTests;
@IgnoreInheritedTests
@RunWith(CustomBaseRunner.class)
public class InlineMethodTests14 extends InlineMethodTests {
@Rule
public InlineMethodTestSetup14 fgTestSetup14= new InlineMethodTestSetup14();
protected void performSimpleTest() throws Exception {
performTestInlineCall(fgTestSetup14.getSimplePackage(), getName(), COMPARE_WITH_OUTPUT, fgTestSetup14.getSimplePkgOutName());
}
protected void performDefaultTest() throws Exception {
performTestInlineCall(fgTestSetup14.getDefaultPackage(), getName(), COMPARE_WITH_OUTPUT, fgTestSetup14.getSimplePkgOutName());
}
@Override
protected String getFilePath(IPackageFragment pack, String name) {
IPackageFragment packToUse = pack;
if (pack == fgTestSetup14.getDefaultPackage()) {
packToUse= fgTestSetup14.getSimplePackage();
}
return super.getFilePath(packToUse, name);
}
//--- TESTS
@Test
public void testTextBlock1() throws Exception {
performSimpleTest();
}
@Test
public void testInlineProblem1() throws Exception {
performDefaultTest();
}
@Test
public void testInlineProblem2() throws Exception {
performDefaultTest();
}
}