mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove outdated InspectionProfilesConverterTest
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<settings>
|
||||
<profile version="1.0" is_locked="false">
|
||||
<option name="myName" value="Project Default"/>
|
||||
<option name="myLocal" value="false"/>
|
||||
</profile>
|
||||
<profile version="1.0" is_locked="false">
|
||||
<option name="myName" value="p1"/>
|
||||
<option name="myLocal" value="false"/>
|
||||
<inspection_tool class="ConstantConditions" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="SUGGEST_NULLABLE_ANNOTATIONS" value="true"/>
|
||||
<option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="true"/>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
<option name="PROJECT_PROFILE" value="p1"/>
|
||||
<option name="USE_PROJECT_PROFILE" value="true"/>
|
||||
<version value="1.0"/>
|
||||
</settings>
|
||||
-63
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.codeInspection;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
import com.intellij.codeInspection.ex.InspectionProfileImpl;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.JDOMUtil;
|
||||
import com.intellij.profile.codeInspection.ProjectInspectionProfileManagerImpl;
|
||||
import com.intellij.testFramework.LightIdeaTestCase;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import org.jdom.Element;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* @author anna
|
||||
* Date: 13-Apr-2009
|
||||
*/
|
||||
public class InspectionProfilesConverterTest extends LightIdeaTestCase {
|
||||
public void testOptions() throws Exception {
|
||||
doTest("options");
|
||||
}
|
||||
|
||||
public void testScope() throws Exception {
|
||||
doTest("scope");
|
||||
}
|
||||
|
||||
private static void doTest(final String dirName) throws Exception {
|
||||
InspectionProfileImpl.INIT_INSPECTIONS = true;
|
||||
try {
|
||||
final String relativePath = "/inspection/converter/";
|
||||
final File projectFile = new File(JavaTestUtil.getJavaTestDataPath() + relativePath + dirName + "/options.ipr");
|
||||
for (Element element : JDOMUtil.load(projectFile).getChildren("component")) {
|
||||
if (Comparing.strEqual(element.getAttributeValue("name"), "InspectionProjectProfileManager")) {
|
||||
final ProjectInspectionProfileManagerImpl profileManager = ProjectInspectionProfileManagerImpl.getInstanceImpl(getProject());
|
||||
profileManager.loadState(element);
|
||||
|
||||
Element configElement = profileManager.getState();
|
||||
final File file = new File(JavaTestUtil.getJavaTestDataPath() + relativePath + dirName + "/options.after.xml");
|
||||
PlatformTestUtil.assertElementsEqual(JDOMUtil.load(file), configElement);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally {
|
||||
InspectionProfileImpl.INIT_INSPECTIONS = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user