2 * Copyright 2000-2016 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 com.siyeh.ig.junit;
18 import com.intellij.codeInspection.InspectionProfileEntry;
19 import com.siyeh.ig.LightInspectionTestCase;
22 * @author Bas Leijdekkers
24 public class UseOfObsoleteAssertInspectionTest extends LightInspectionTestCase {
26 public void testObsoleteAssert() { doTest(); }
29 protected String[] getEnvironmentClasses() {
31 "package junit.framework;" +
32 "public class Assert {" +
33 " static public void assertEquals(String message, int expected, int actual) {}" +
36 "package junit.framework;" +
37 "public class TestCase extends Assert {" +
38 " public static void assertEquals(String message, int expected, int actual) {" +
39 " Assert.assertEquals(message, expected, actual);" +
43 "package org.junit;" +
44 "public class Assert {}"
49 protected InspectionProfileEntry getInspection() {
50 return new UseOfObsoleteAssertInspection();