mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-18 07:15:51 +07:00
67 lines
1.6 KiB
Java
67 lines
1.6 KiB
Java
/*
|
|
* Copyright (c) 2000-2006 JetBrains s.r.o. All Rights Reserved.
|
|
*/
|
|
|
|
package com.intellij.codeInspection;
|
|
|
|
import com.intellij.JavaTestUtil;
|
|
import com.intellij.codeInspection.deprecation.DeprecationInspection;
|
|
import com.intellij.testFramework.InspectionTestCase;
|
|
|
|
/**
|
|
* @author max
|
|
*/
|
|
public class DeprecationInspectionTest extends InspectionTestCase {
|
|
@Override
|
|
protected String getTestDataPath() {
|
|
return JavaTestUtil.getJavaTestDataPath() + "/inspection";
|
|
}
|
|
|
|
private void doTest() throws Exception {
|
|
doTest("deprecation/" + getTestName(true), new DeprecationInspection());
|
|
}
|
|
|
|
public void testDeprecatedMethod() throws Exception{
|
|
doTest();
|
|
}
|
|
|
|
public void testDeprecatedInImport() throws Exception{
|
|
doTest();
|
|
}
|
|
|
|
public void testDeprecatedInStaticImport() throws Exception{
|
|
doTest();
|
|
}
|
|
|
|
public void testDeprecatedInner() throws Exception {
|
|
doTest();
|
|
}
|
|
|
|
public void testDeprecatedField() throws Exception{
|
|
doTest();
|
|
}
|
|
|
|
public void testDeprecatedDefaultConstructorInSuper() throws Exception {
|
|
doTest();
|
|
}
|
|
|
|
public void testDeprecatedDefaultConstructorInSuperNotCalled() throws Exception {
|
|
doTest();
|
|
}
|
|
|
|
public void testDeprecatedDefaultConstructorTypeParameter() throws Exception {
|
|
doTest();
|
|
}
|
|
|
|
public void testDeprecationOnVariableWithAnonymousClass() throws Exception {
|
|
doTest();
|
|
}
|
|
|
|
public void testMethodsOfDeprecatedClass() throws Exception {
|
|
final DeprecationInspection tool = new DeprecationInspection();
|
|
tool.IGNORE_METHODS_OF_DEPRECATED = false;
|
|
doTest("deprecation/" + getTestName(true), tool);
|
|
}
|
|
|
|
}
|