2 * Copyright 2000-2015 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.jetbrains.idea.devkit.inspections;
18 import com.intellij.openapi.application.PluginPathManager;
19 import com.intellij.testFramework.TestDataPath;
21 @TestDataPath("$CONTENT_ROOT/testData/inspections/statefulEp")
22 public class StatefulEpInspectionTest extends PluginModuleTestCase {
24 protected String getBasePath() {
25 return PluginPathManager.getPluginHomePathRelative("devkit") + "/testData/inspections/statefulEp";
29 protected void setUp() throws Exception {
31 myFixture.addClass("package com.intellij.openapi.project; public class Project {}");
32 myFixture.addClass("package com.intellij.psi; public class PsiElement {}");
33 myFixture.addClass("package com.intellij.psi; public class PsiReference {}");
34 myFixture.addClass("package com.intellij.codeInspection; public class LocalQuickFix {}");
35 myFixture.enableInspections(new StatefulEpInspection());
38 public void testLocalQuickFix() {
39 myFixture.testHighlighting("Fix.java");
42 public void testNonFix() {
43 myFixture.testHighlighting("NonFix.java");
46 public void testExt() {
47 setPluginXml("plugin.xml");
48 myFixture.testHighlighting("Ext.java");