cleanup redundant throwables

This commit is contained in:
Anna.Kozlova
2017-08-24 09:10:19 +02:00
parent 9dcd0f2fc0
commit 17fcbb3259
57 changed files with 687 additions and 702 deletions
@@ -42,7 +42,6 @@ import com.intellij.vcsUtil.VcsUtil;
import org.jetbrains.annotations.NotNull;
import org.picocontainer.MutablePicoContainer;
import java.io.IOException;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
@@ -125,7 +124,7 @@ public class ReformatOnlyVcsChangedTextTest extends LightPlatformTestCase {
}
}
public void testInsertion() throws IOException {
public void testInsertion() {
doTest(
"public class B {\n" +
" int a = 3;\n" +
@@ -149,7 +148,7 @@ public class ReformatOnlyVcsChangedTextTest extends LightPlatformTestCase {
return new ChangedLines(from, to);
}
public void testDeletion() throws IOException {
public void testDeletion() {
doTest(
"public class B {\n" +
" int a = 3;\n" +
@@ -168,7 +167,7 @@ public class ReformatOnlyVcsChangedTextTest extends LightPlatformTestCase {
);
}
public void testNoReformatOn_DeletionModification() throws IOException {
public void testNoReformatOn_DeletionModification() {
doTest(
"public class B {\n" +
" int a = 3;\n" +
@@ -186,7 +185,7 @@ public class ReformatOnlyVcsChangedTextTest extends LightPlatformTestCase {
);
}
public void testModification() throws IOException {
public void testModification() {
doTest(
"public class B {\n" +
" int a = 3;\n" +
@@ -208,7 +207,7 @@ public class ReformatOnlyVcsChangedTextTest extends LightPlatformTestCase {
);
}
public void testModificationCRLF() throws IOException {
public void testModificationCRLF() {
doTest(
"public class B {\r\n" +
" int a = 3;\r\n" +
@@ -230,7 +229,7 @@ public class ReformatOnlyVcsChangedTextTest extends LightPlatformTestCase {
);
}
public void testReformatFiles() throws IOException {
public void testReformatFiles() {
ChangedFilesStructure fs = new ChangedFilesStructure(myWorkingDirectory);
PsiFile m1 = fs.createFile("Test1.java", COMMITTED, MODIFIED);
@@ -275,7 +274,7 @@ public class ReformatOnlyVcsChangedTextTest extends LightPlatformTestCase {
assertFormattedLines(NO_CHANGED_LINES, untouched1, untouched2);
}
public void testReformatInAllSubtree() throws IOException {
public void testReformatInAllSubtree() {
ChangedFilesStructure fs = new ChangedFilesStructure(myWorkingDirectory);
PsiFile modified11 = fs.createFile("Test4.java", COMMITTED, MODIFIED);
PsiFile modified12 = fs.createFile("Test5.java", COMMITTED, MODIFIED);
@@ -19,17 +19,17 @@ import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.editor.impl.AbstractEditorTest;
public abstract class AbstractMoveElementLeftRightTest extends AbstractEditorTest {
protected void doTestFromLeftToRight(String leftMostPosition, String... rightPositions) throws Exception {
protected void doTestFromLeftToRight(String leftMostPosition, String... rightPositions) {
doTest(true, leftMostPosition);
doTest(false, leftMostPosition, rightPositions);
}
protected void doTestFromRightToLeft(String rightMostPosition, String... leftPositions) throws Exception {
protected void doTestFromRightToLeft(String rightMostPosition, String... leftPositions) {
doTest(false, rightMostPosition);
doTest(true, rightMostPosition, leftPositions);
}
private void doTest(boolean moveLeft, String before, String... after) throws Exception {
private void doTest(boolean moveLeft, String before, String... after) {
String current = before;
for (String next : after) {
doTestSingle(moveLeft, current, next);
@@ -4,7 +4,7 @@ import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.editor.impl.AbstractEditorTest;
public class ForwardBackwardParagraphActionTest extends AbstractEditorTest {
public void testForwardFromNonEmptyLine() throws Exception {
public void testForwardFromNonEmptyLine() {
doTestForward("ab<caret>c\n" +
"\n" +
"def\n" +
@@ -16,7 +16,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest {
"\n");
}
public void testForwardFromEmptyLine() throws Exception {
public void testForwardFromEmptyLine() {
doTestForward("<caret>\n" +
"\n" +
"def\n" +
@@ -28,7 +28,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest {
"<caret>\n");
}
public void testForwardWhenNoMoreBlankLines() throws Exception {
public void testForwardWhenNoMoreBlankLines() {
doTestForward("ab<caret>c\n" +
"def",
@@ -36,7 +36,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest {
"def<caret>");
}
public void testForwardWhenTargetLineContainsSpaces() throws Exception {
public void testForwardWhenTargetLineContainsSpaces() {
doTestForward("<caret>abc\n" +
" \n",
@@ -44,7 +44,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest {
"<caret> \n");
}
public void testBackwardFromNonEmptyLine() throws Exception {
public void testBackwardFromNonEmptyLine() {
doTestBackward("\n" +
"abc\n" +
"\n" +
@@ -56,7 +56,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest {
"def");
}
public void testBackwardFromEmptyLine() throws Exception {
public void testBackwardFromEmptyLine() {
doTestBackward("\n" +
"abc\n" +
"\n" +
@@ -68,7 +68,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest {
"\n");
}
public void testBackwardWhenNoMoreBlankLines() throws Exception {
public void testBackwardWhenNoMoreBlankLines() {
doTestBackward("abc\n" +
"de<caret>f",
@@ -76,7 +76,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest {
"def");
}
public void testBackwardWhenTargetLineContainsSpaces() throws Exception {
public void testBackwardWhenTargetLineContainsSpaces() {
doTestBackward(" \n" +
"abc\n" +
"\n" +
@@ -88,7 +88,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest {
"\n");
}
public void testBackwardWhenPreviousLineContainsSpaces() throws Exception {
public void testBackwardWhenPreviousLineContainsSpaces() {
doTestBackward(" \n" +
"ab<caret>c",
@@ -96,7 +96,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest {
"<caret>abc");
}
public void testBackwardAtLineStartWhenPreviousLineContainsSpaces() throws Exception {
public void testBackwardAtLineStartWhenPreviousLineContainsSpaces() {
doTestBackward("\n" +
"ttt\n" +
" \n" +
@@ -20,10 +20,8 @@ import com.intellij.openapi.editor.ex.BidiTextDirection;
import com.intellij.openapi.editor.ex.EditorSettingsExternalizable;
import com.intellij.testFramework.TestFileType;
import java.io.IOException;
public class EditorRtlTest extends AbstractRtlTest {
public void testPositionCalculations() throws IOException {
public void testPositionCalculations() {
prepareText("LLRR");
checkOffsetConversions(0, lB(0), vL(0), vR(0), xy(0));
@@ -66,7 +64,7 @@ public class EditorRtlTest extends AbstractRtlTest {
checkXYConversion(xy(51), vR(5));
}
public void testNumberInsideRtlText() throws IOException {
public void testNumberInsideRtlText() {
prepareText("RR12RR");
checkOffsetConversions(0, lB(0), vL(0), vL(6), xy(0), xy(60));
@@ -112,7 +110,7 @@ public class EditorRtlTest extends AbstractRtlTest {
checkXYConversion(xy(61), vR(6));
}
public void testFolding() throws IOException {
public void testFolding() {
prepareText("RRRRRR");
addCollapsedFoldRegion(2, 4, "...");
@@ -166,7 +164,7 @@ public class EditorRtlTest extends AbstractRtlTest {
checkXYConversion(xy(81), vR(8));
}
public void testFoldingWhenLineContainsSeveralFragments() throws IOException {
public void testFoldingWhenLineContainsSeveralFragments() {
prepareText("R R");
addCollapsedFoldRegion(1, 2, "...");
@@ -176,7 +174,7 @@ public class EditorRtlTest extends AbstractRtlTest {
checkOffsetConversions(3, lB(3), vR(4), vR(5), xy(40), xy(50));
}
public void testFoldingInInnerBidiRun() throws IOException {
public void testFoldingInInnerBidiRun() {
prepareText("LRRL");
addCollapsedFoldRegion(1, 2, "...");
@@ -187,7 +185,7 @@ public class EditorRtlTest extends AbstractRtlTest {
checkLPConversions(4, 4, vL(6), vR(6));
}
public void testPositionCalculationsWithSoftWraps() throws Exception {
public void testPositionCalculationsWithSoftWraps() {
prepareText("RR RR");
configureSoftWraps(3);
@@ -252,7 +250,7 @@ public class EditorRtlTest extends AbstractRtlTest {
checkXYConversion(xy(41, 10), vR(1, 4));
}
public void testSelectingRtlLineByDraggingMouseFromLeftToRight() throws IOException {
public void testSelectingRtlLineByDraggingMouseFromLeftToRight() {
prepareText("R");
setEditorVisibleSize(1000, 1000);
mouse().pressAtXY(0, 5).dragToXY(15, 5).release();
@@ -260,7 +258,7 @@ public class EditorRtlTest extends AbstractRtlTest {
checkResult("<selection>R</selection>");
}
public void testSelectingRtlLineByDraggingMouseFromRightToLeft() throws IOException {
public void testSelectingRtlLineByDraggingMouseFromRightToLeft() {
prepareText("R");
setEditorVisibleSize(1000, 1000);
mouse().pressAtXY(15, 5).dragToXY(0, 5).release();
@@ -268,19 +266,19 @@ public class EditorRtlTest extends AbstractRtlTest {
checkResult("<selection>R</selection>");
}
public void testMovingCaretToLogicalLineEnd() throws IOException {
public void testMovingCaretToLogicalLineEnd() {
prepareText("R");
myEditor.getCaretModel().moveToLogicalPosition(lF(1));
assertVisualPositionsEqual("Wrong visual position", vR(1), myEditor.getCaretModel().getVisualPosition());
}
public void testMovingCaretToVisualLineEnd() throws IOException {
public void testMovingCaretToVisualLineEnd() {
prepareText("R");
myEditor.getCaretModel().moveToVisualPosition(vR(1));
assertLogicalPositionsEqual("Wrong logical position", lF(1), myEditor.getCaretModel().getLogicalPosition());
}
public void testNavigationWithArrowKeys() throws Exception {
public void testNavigationWithArrowKeys() {
prepareText("LLRRLL\nLLRRLL");
assertCaretPosition(vL(0));
right();
@@ -303,7 +301,7 @@ public class EditorRtlTest extends AbstractRtlTest {
assertCaretPosition(vR(2));
}
public void testMovingIntoVirtualSpace() throws Exception {
public void testMovingIntoVirtualSpace() {
prepareText("R");
myEditor.getSettings().setVirtualSpace(true);
assertVisualCaretLocation(0, false);
@@ -319,7 +317,7 @@ public class EditorRtlTest extends AbstractRtlTest {
assertVisualCaretLocation(3, false);
}
public void testMovingThroughFoldedRegion() throws Exception {
public void testMovingThroughFoldedRegion() {
prepareText("RRR");
addCollapsedFoldRegion(1, 2, "..");
assertVisualCaretLocation(0, false);
@@ -339,7 +337,7 @@ public class EditorRtlTest extends AbstractRtlTest {
assertVisualCaretLocation(4, true);
}
public void testMovingCaretWhenSelectionExists() throws Exception {
public void testMovingCaretWhenSelectionExists() {
prepareText("RRR");
right();
right();
@@ -349,7 +347,7 @@ public class EditorRtlTest extends AbstractRtlTest {
assertVisualCaretLocation(2, true);
}
public void testMovingCaretWhenSelectionStartsOnDirectionBoundary() throws Exception {
public void testMovingCaretWhenSelectionStartsOnDirectionBoundary() {
prepareText("LR");
right();
right();
@@ -358,14 +356,14 @@ public class EditorRtlTest extends AbstractRtlTest {
assertVisualCaretLocation(2, true);
}
public void testMoveCaretWithSelection() throws Exception {
public void testMoveCaretWithSelection() {
prepareText("LR");
executeAction(IdeActions.ACTION_EDITOR_MOVE_CARET_RIGHT_WITH_SELECTION);
executeAction(IdeActions.ACTION_EDITOR_MOVE_CARET_RIGHT_WITH_SELECTION);
checkResult("<selection>LR</selection>");
}
public void testNextPrevWord() throws Exception {
public void testNextPrevWord() {
prepareText("LL RR RR LL");
nextWord();
assertVisualCaretLocation(3, false);
@@ -397,7 +395,7 @@ public class EditorRtlTest extends AbstractRtlTest {
assertVisualCaretLocation(0, false);
}
public void testNextPrevWordWithSelection() throws Exception {
public void testNextPrevWordWithSelection() {
prepareText("LL RR RR LL");
moveCaretToNextWordWithSelection();
checkResult("<selection>LL </selection>RR RR LL");
@@ -429,7 +427,7 @@ public class EditorRtlTest extends AbstractRtlTest {
checkResult("<selection></selection>LL RR RR LL");
}
public void testHomeEnd() throws Exception {
public void testHomeEnd() {
prepareText("RR");
myEditor.getCaretModel().moveToOffset(1);
home();
@@ -438,7 +436,7 @@ public class EditorRtlTest extends AbstractRtlTest {
assertVisualCaretLocation(2, false);
}
public void testHomeEndWithSelection() throws Exception {
public void testHomeEndWithSelection() {
prepareText("RR");
myEditor.getCaretModel().moveToOffset(1);
homeWithSelection();
@@ -449,7 +447,7 @@ public class EditorRtlTest extends AbstractRtlTest {
checkResult("R<selection>R</selection>");
}
public void testTextStartEnd() throws Exception {
public void testTextStartEnd() {
prepareText("RR");
myEditor.getCaretModel().moveToOffset(1);
executeAction(IdeActions.ACTION_EDITOR_TEXT_START);
@@ -458,7 +456,7 @@ public class EditorRtlTest extends AbstractRtlTest {
assertVisualCaretLocation(2, false);
}
public void testTextStartEndWithSelection() throws Exception {
public void testTextStartEndWithSelection() {
prepareText("RR");
myEditor.getCaretModel().moveToOffset(1);
executeAction(IdeActions.ACTION_EDITOR_TEXT_START_WITH_SELECTION);
@@ -495,7 +493,7 @@ public class EditorRtlTest extends AbstractRtlTest {
checkResult("<L>R R<caret></L>");
}
public void testMovingThroughBoundaryBetweenRunsWithNonadjacentLevels() throws Exception {
public void testMovingThroughBoundaryBetweenRunsWithNonadjacentLevels() {
prepareText("R=1");
right();
assertVisualCaretLocation(0, false);
@@ -508,7 +506,7 @@ public class EditorRtlTest extends AbstractRtlTest {
assertEquals(2, myEditor.getCaretModel().getOffset());
}
public void testMovingCaretThroughSoftWrap() throws Exception {
public void testMovingCaretThroughSoftWrap() {
prepareText("RR RR");
configureSoftWraps(3);
@@ -532,13 +530,13 @@ public class EditorRtlTest extends AbstractRtlTest {
assertVisualCaretLocation(1, 3, true);
}
public void testLineGeneralDirectionAutodetection() throws Exception {
public void testLineGeneralDirectionAutodetection() {
prepareText("<caret>RLR");
right();
checkResult("RLR<caret>");
}
public void testTabInsideRtlText() throws Exception {
public void testTabInsideRtlText() {
prepareText("<caret>R\tRR");
right();
checkResult("R<caret>\tRR");
@@ -175,7 +175,7 @@ public class SoftWrapApplianceOnDocumentModificationTest extends AbstractEditorT
assertEquals(new VisualPosition(2, 4), myEditor.getCaretModel().getVisualPosition());
}
public void testTypingThatExceedsRightMarginOnLastSoftWrappedLine() throws IOException {
public void testTypingThatExceedsRightMarginOnLastSoftWrappedLine() {
String text =
"line1\n" +
"long line<caret>";
@@ -454,7 +454,7 @@ public class SoftWrapApplianceOnDocumentModificationTest extends AbstractEditorT
assertEquals(startOffset, myEditor.logicalPositionToOffset(myEditor.visualToLogicalPosition(new VisualPosition(2, 0))));
}
public void testFoldRegionThatStartsAtLineEnd() throws IOException {
public void testFoldRegionThatStartsAtLineEnd() {
String text =
"line1\n" +
"line2\n" +
@@ -572,7 +572,7 @@ public class SoftWrapApplianceOnDocumentModificationTest extends AbstractEditorT
assertEquals(expectedVisualLine, caretModel.getVisualPosition().line);
}
public void testSoftWrapToHardWrapConversion() throws IOException {
public void testSoftWrapToHardWrapConversion() {
String text =
"this is line 1\n" +
"this is line 2\n" +
@@ -880,14 +880,14 @@ public class SoftWrapApplianceOnDocumentModificationTest extends AbstractEditorT
);
}
public void testNoPreliminarySoftWrapAtLineEnd() throws IOException {
public void testNoPreliminarySoftWrapAtLineEnd() {
// We used to make soft wrap when the string was couple of visual columns before the right screen edge even if it could
// be completely shown.
init(52, "a b c", 10);
assertEmpty(getSoftWrapModel().getRegisteredSoftWraps());
}
public void testNoPreliminarySoftWrapBeforeFoldingAtLineEnd() throws IOException {
public void testNoPreliminarySoftWrapBeforeFoldingAtLineEnd() {
final String text = "a b c test";
init(71, text, 10);
addCollapsedFoldRegion(text.indexOf("t"), text.length(), ".");
@@ -930,7 +930,7 @@ public class SoftWrapApplianceOnDocumentModificationTest extends AbstractEditorT
assertEquals(myEditor.offsetToVisualPosition(start).line, myEditor.offsetToVisualPosition(end - 1).line);
}
public void testEnsureBeforeSoftWrapSignIsVisible() throws IOException {
public void testEnsureBeforeSoftWrapSignIsVisible() {
final String text = "a.b.c.d";
init(61, text, 10);
@@ -1005,7 +1005,7 @@ public class SoftWrapApplianceOnDocumentModificationTest extends AbstractEditorT
assertEquals(position, caretModel.getVisualPosition());
}
public void testNoUnnecessaryHorizontalScrollBar() throws IOException {
public void testNoUnnecessaryHorizontalScrollBar() {
// Inspired by IDEA-87184
final String text = "12345678 abcdefgh";
init(15, 10, text);
@@ -1119,11 +1119,11 @@ public class SoftWrapApplianceOnDocumentModificationTest extends AbstractEditorT
assertEquals(new LogicalPosition(2, 0), myEditor.visualToLogicalPosition(new VisualPosition(2, 1)));
}
private void init(final int visibleWidthInColumns, @NotNull String fileText) throws IOException {
private void init(final int visibleWidthInColumns, @NotNull String fileText) {
init(visibleWidthInColumns, 10, fileText);
}
private void init(final int visibleWidthInColumns, final int symbolWidthInPixels, @NotNull String fileText) throws IOException {
private void init(final int visibleWidthInColumns, final int symbolWidthInPixels, @NotNull String fileText) {
init(visibleWidthInColumns * symbolWidthInPixels, fileText, symbolWidthInPixels);
}
@@ -131,12 +131,11 @@ public class XDebuggerTestUtil {
return container.waitFor(TIMEOUT_MS);
}
public static List<XStackFrame> collectFrames(@NotNull XDebugSession session) throws InterruptedException {
public static List<XStackFrame> collectFrames(@NotNull XDebugSession session) {
return collectFrames(null, session);
}
public static List<XStackFrame> collectFrames(@Nullable XExecutionStack thread, @NotNull XDebugSession session)
throws InterruptedException {
public static List<XStackFrame> collectFrames(@Nullable XExecutionStack thread, @NotNull XDebugSession session) {
return collectFrames(thread == null ? getActiveThread(session) : thread);
}
@@ -257,12 +256,11 @@ public class XDebuggerTestUtil {
if (hasChildren != null) assertEquals(hasChildren, node.myHasChildren);
}
public static void assertVariableValue(XValue var, @Nullable String name, @Nullable String value) throws InterruptedException {
public static void assertVariableValue(XValue var, @Nullable String name, @Nullable String value) {
assertVariable(var, name, null, value, null);
}
public static void assertVariableValue(Collection<XValue> vars, @Nullable String name, @Nullable String value)
throws InterruptedException {
public static void assertVariableValue(Collection<XValue> vars, @Nullable String name, @Nullable String value) {
assertVariableValue(findVar(vars, name), name, value);
}
@@ -275,7 +273,7 @@ public class XDebuggerTestUtil {
public static void assertVariableValueMatches(@NotNull Collection<XValue> vars,
@Nullable String name,
@Nullable String type,
@Nullable @Language("RegExp") String valuePattern) throws InterruptedException {
@Nullable @Language("RegExp") String valuePattern) {
assertVariableValueMatches(findVar(vars, name), name, type, valuePattern);
}
@@ -283,20 +281,20 @@ public class XDebuggerTestUtil {
@Nullable String name,
@Nullable String type,
@Nullable @Language("RegExp") String valuePattern,
@Nullable Boolean hasChildren) throws InterruptedException {
@Nullable Boolean hasChildren) {
assertVariableValueMatches(findVar(vars, name), name, type, valuePattern, hasChildren);
}
public static void assertVariableValueMatches(@NotNull XValue var,
@Nullable String name,
@Nullable @Language("RegExp") String valuePattern) throws InterruptedException {
@Nullable @Language("RegExp") String valuePattern) {
assertVariableValueMatches(var, name, null, valuePattern);
}
public static void assertVariableValueMatches(@NotNull XValue var,
@Nullable String name,
@Nullable String type,
@Nullable @Language("RegExp") String valuePattern) throws InterruptedException {
@Nullable @Language("RegExp") String valuePattern) {
assertVariableValueMatches(var, name, type, valuePattern, null);
}
@@ -316,7 +314,7 @@ public class XDebuggerTestUtil {
public static void assertVariableTypeMatches(@NotNull Collection<XValue> vars,
@Nullable String name,
@Nullable @Language("RegExp") String typePattern) throws InterruptedException {
@Nullable @Language("RegExp") String typePattern) {
assertVariableTypeMatches(findVar(vars, name), name, typePattern);
}
@@ -433,7 +431,7 @@ public class XDebuggerTestUtil {
@Nullable String name,
@Nullable String type,
@Nullable String value,
@Nullable Boolean hasChildren) throws InterruptedException {
@Nullable Boolean hasChildren) {
assertVariable(findVar(vars, name), name, type, value, hasChildren);
}
@@ -542,7 +540,7 @@ public class XDebuggerTestUtil {
@Nullable String name,
@Nullable String type,
@Nullable String value,
@Nullable Boolean hasChildren) throws InterruptedException {
@Nullable Boolean hasChildren) {
assertNull(varAndErrorMessage.second);
assertVariable(varAndErrorMessage.first, name, type, value, hasChildren);
}
@@ -22,7 +22,7 @@ import com.siyeh.ig.IGInspectionTestCase;
*/
public class BatchPackageNamingConventionInspectionTest extends IGInspectionTestCase {
public void test() throws Exception {
public void test() {
doTest("com/siyeh/igtest/naming/batch_package_naming_convention", new PackageNamingConventionInspection());
}
}
@@ -203,11 +203,11 @@ public class JavaFXRenameTest extends AbstractJavaFXRenameTest {
myFixture.checkResultByFile(getTestName(false) + ".java", getTestName(false) + "_after.java", false);
}
public void testControllerStringProperty() throws Exception {
public void testControllerStringProperty() {
doTestProperty("newName", false);
}
public void testControllerBooleanProperty() throws Exception {
public void testControllerBooleanProperty() {
doTestProperty("newName", true);
}
@@ -34,7 +34,7 @@ public class JavaFxCompletionTest extends LightFixtureCompletionTestCase {
return AbstractJavaFXTestCase.JAVA_FX_DESCRIPTOR;
}
public void testAvailablePositions() throws Exception {
public void testAvailablePositions() {
doTest();
}
@@ -74,7 +74,7 @@ public class JavaFxCompletionTest extends LightFixtureCompletionTestCase {
doTest("fx:script");
}
public void testStaticPropertiesEnumValue() throws Exception {
public void testStaticPropertiesEnumValue() {
doTest();
}
@@ -94,7 +94,7 @@ public class JavaFxCompletionTest extends LightFixtureCompletionTestCase {
doTest("observableArrayList");
}
public void testVariableCompletion() throws Exception {
public void testVariableCompletion() {
doTest();
}
@@ -269,13 +269,13 @@ public class JavaFxCompletionTest extends LightFixtureCompletionTestCase {
assertSameElements(myFixture.getLookupElementStrings(), "MY_TEXT", "SUPER_TEXT");
}
public void testMultipleStylesheetsAttribute() throws Exception {
public void testMultipleStylesheetsAttribute() {
myFixture.addFileToProject("mystyle.css", ".myStyle {}");
myFixture.addFileToProject("very/deeply/located/small.css", ".small {}");
doTest();
}
public void testMultipleStylesheetsTag() throws Exception {
public void testMultipleStylesheetsTag() {
myFixture.addFileToProject("mystyle.css", ".myStyle {}");
myFixture.addFileToProject("very/deeply/located/small.css", ".small {}");
doTest();
@@ -52,7 +52,6 @@ import org.jetbrains.jps.model.java.JavaSourceRootType;
import org.jetbrains.jps.model.module.JpsModuleSourceRootType;
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
@@ -372,7 +371,7 @@ public abstract class MavenImportingTestCase extends MavenTestCase {
return ModuleRootManager.getInstance(getModule(module));
}
protected void importProject(@NonNls String xml) throws IOException {
protected void importProject(@NonNls String xml) {
createProjectPom(xml);
importProject();
}
@@ -393,7 +392,7 @@ public abstract class MavenImportingTestCase extends MavenTestCase {
doImportProjects(true, Arrays.asList(files));
}
protected void importProjectWithMaven3(@NonNls String xml) throws IOException {
protected void importProjectWithMaven3(@NonNls String xml) {
createProjectPom(xml);
importProjectWithMaven3();
}
@@ -387,19 +387,19 @@ public abstract class MavenTestCase extends UsefulTestCase {
"</project>";
}
protected VirtualFile createProfilesXmlOldStyle(String xml) throws IOException {
protected VirtualFile createProfilesXmlOldStyle(String xml) {
return createProfilesFile(myProjectRoot, xml, true);
}
protected VirtualFile createProfilesXmlOldStyle(String relativePath, String xml) throws IOException {
protected VirtualFile createProfilesXmlOldStyle(String relativePath, String xml) {
return createProfilesFile(createProjectSubDir(relativePath), xml, true);
}
protected VirtualFile createProfilesXml(String xml) throws IOException {
protected VirtualFile createProfilesXml(String xml) {
return createProfilesFile(myProjectRoot, xml, false);
}
protected VirtualFile createProfilesXml(String relativePath, String xml) throws IOException {
protected VirtualFile createProfilesXml(String relativePath, String xml) {
return createProfilesFile(createProjectSubDir(relativePath), xml, false);
}
@@ -30,7 +30,6 @@ import org.jetbrains.concurrency.Promise;
import org.jetbrains.idea.maven.dom.MavenDomWithIndicesTestCase;
import org.jetbrains.idea.maven.importing.MavenProjectModelModifier;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.regex.Matcher;
@@ -40,7 +39,7 @@ import java.util.regex.Pattern;
* @author nik
*/
public class MavenProjectModelModifierTest extends MavenDomWithIndicesTestCase {
public void testAddExternalLibraryDependency() throws IOException {
public void testAddExternalLibraryDependency() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -54,7 +53,7 @@ public class MavenProjectModelModifierTest extends MavenDomWithIndicesTestCase {
assertModuleLibDep("project", "Maven: junit:junit:" + version);
}
public void testAddExternalLibraryDependencyWithEqualMinAndMaxVersions() throws IOException {
public void testAddExternalLibraryDependencyWithEqualMinAndMaxVersions() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -68,7 +67,7 @@ public class MavenProjectModelModifierTest extends MavenDomWithIndicesTestCase {
assertModuleLibDep("project", "Maven: commons-io:commons-io:2.4");
}
public void testAddManagedLibraryDependency() throws IOException {
public void testAddManagedLibraryDependency() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -91,7 +90,7 @@ public class MavenProjectModelModifierTest extends MavenDomWithIndicesTestCase {
assertModuleLibDep("project", "Maven: commons-io:commons-io:2.4");
}
public void testAddManagedLibraryDependencyWithDifferentScope() throws IOException {
public void testAddManagedLibraryDependencyWithDifferentScope() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -114,7 +113,7 @@ public class MavenProjectModelModifierTest extends MavenDomWithIndicesTestCase {
assertModuleLibDepScope("project", "Maven: commons-io:commons-io:2.4", DependencyScope.COMPILE);
}
public void testAddLibraryDependencyReleaseVersion() throws IOException {
public void testAddLibraryDependencyReleaseVersion() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -136,7 +135,7 @@ public class MavenProjectModelModifierTest extends MavenDomWithIndicesTestCase {
assertNotNull(dep);
}
public void testAddModuleDependency() throws IOException {
public void testAddModuleDependency() {
createTwoModulesPom("m1", "m2");
VirtualFile m1 = createModulePom("m1", "<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -153,7 +152,7 @@ public class MavenProjectModelModifierTest extends MavenDomWithIndicesTestCase {
assertModuleModuleDeps("m1", "m2");
}
public void testAddLibraryDependency() throws IOException {
public void testAddLibraryDependency() {
createTwoModulesPom("m1", "m2");
VirtualFile m1 = createModulePom("m1", "<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -182,7 +181,7 @@ public class MavenProjectModelModifierTest extends MavenDomWithIndicesTestCase {
assertModuleLibDep("m1", libName);
}
public void testChangeLanguageLevel() throws IOException {
public void testChangeLanguageLevel() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -203,7 +202,7 @@ public class MavenProjectModelModifierTest extends MavenDomWithIndicesTestCase {
assertEquals(LanguageLevel.JDK_1_8, EffectiveLanguageLevelUtil.getEffectiveLanguageLevel(module));
}
private void createTwoModulesPom(final String m1, final String m2) throws IOException {
private void createTwoModulesPom(final String m1, final String m2) {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -17,7 +17,6 @@ package org.jetbrains.idea.maven.compiler;
import com.intellij.compiler.CompilerConfiguration;
import com.intellij.compiler.CompilerConfigurationImpl;
import com.intellij.openapi.application.AccessToken;
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.compiler.options.ExcludeEntryDescription;
@@ -588,7 +587,7 @@ public class ResourceCopyingTest extends MavenCompilingTestCase {
assertNotCopied("target/classes/file.txt");
}
public void testOverridingWebResourceFilters() throws Exception {
public void testOverridingWebResourceFilters() {
if (ignore()) return;
createProjectPom("<groupId>test</groupId>" +
@@ -1010,7 +1010,7 @@ public class ResourceFilteringTest extends MavenCompilingTestCase {
"value2=\\value\n");
}
public void testDoNotFilterButCopyBigFiles() throws Exception {
public void testDoNotFilterButCopyBigFiles() {
assertEquals(FileTypeManager.getInstance().getFileTypeByFileName("file.xyz"), FileTypes.UNKNOWN);
new WriteAction() {
@@ -45,7 +45,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
"<version>1</version>");
}
public void testGroupIdCompletion() throws Exception {
public void testGroupIdCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -59,7 +59,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertCompletionVariantsInclude(myProjectPom, "junit", "jmock", "test");
}
public void testArtifactIdCompletion() throws Exception {
public void testArtifactIdCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -74,7 +74,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertCompletionVariants(myProjectPom, "junit");
}
public void testDoNotCompleteArtifactIdOnUnknownGroup() throws Exception {
public void testDoNotCompleteArtifactIdOnUnknownGroup() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -89,7 +89,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertCompletionVariants(myProjectPom);
}
public void testVersionCompletion() throws Exception {
public void testVersionCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -106,7 +106,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertEquals(Arrays.asList("4.0", "3.8.2", "3.8.1", "RELEASE", "LATEST"), variants);
}
public void testDoesNotCompleteVersionOnUnknownGroupOrArtifact() throws Exception {
public void testDoesNotCompleteVersionOnUnknownGroupOrArtifact() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -136,7 +136,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertCompletionVariants(myProjectPom, "RELEASE", "LATEST");
}
public void testDoNotCompleteVersionIfNoGroupIdAndArtifactId() throws Exception {
public void testDoNotCompleteVersionIfNoGroupIdAndArtifactId() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -150,7 +150,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertCompletionVariants(myProjectPom); // should not throw
}
public void testAddingLocalProjectsIntoCompletion() throws Exception {
public void testAddingLocalProjectsIntoCompletion() {
createProjectPom("<groupId>project-group</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -186,7 +186,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertCompletionVariants(m, "project", "m1", "m2");
}
public void testResolvingPropertiesForLocalProjectsInCompletion() throws Throwable {
public void testResolvingPropertiesForLocalProjectsInCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -246,7 +246,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting(m);
}
public void testChangingExistingProjects() throws Exception {
public void testChangingExistingProjects() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -304,7 +304,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertCompletionVariants(m1, "project", "m1", "m2_new");
}
public void testChangingExistingProjectsWithArtifactIdsRemoval() throws Exception {
public void testChangingExistingProjectsWithArtifactIdsRemoval() {
VirtualFile m = createModulePom("m1",
"<groupId>project-group</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -342,7 +342,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertCompletionVariants(myProjectPom);
}
public void testRemovingExistingProjects() throws Exception {
public void testRemovingExistingProjects() {
final VirtualFile m = createModulePom("m1",
"<groupId>project-group</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -431,7 +431,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertResolved(myProjectPom, findPsiFile(f));
}
public void testResolveSystemManagedDependency() throws Exception {
public void testResolveSystemManagedDependency() {
String someJarPath = PathUtil.getJarPathForClass(ArrayList.class).replace('\\', '/');
importProject("<groupId>test</groupId>" +
@@ -587,7 +587,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testHighlightInvalidSystemScopeDependencies() throws Throwable {
public void testHighlightInvalidSystemScopeDependencies() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -604,7 +604,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testDoNotHighlightValidSystemScopeDependencies() throws Throwable {
public void testDoNotHighlightValidSystemScopeDependencies() {
String libPath = myIndicesFixture.getRepositoryHelper().getTestDataPath("local1/junit/junit/4.0/junit-4.0.jar");
createProjectPom("<groupId>test</groupId>" +
@@ -648,7 +648,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testCompletionSystemScopeDependenciesWithProperties() throws Throwable {
public void testCompletionSystemScopeDependenciesWithProperties() {
String libPath = myIndicesFixture.getRepositoryHelper().getTestDataPath("local1/junit/junit/4.0/junit-4.0.jar");
createProjectPom("<groupId>test</groupId>" +
@@ -693,7 +693,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testChooseFileIntentionForSystemDependency() throws Throwable {
public void testChooseFileIntentionForSystemDependency() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -739,7 +739,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertEquals(findPsiFile(libFile), dep.getSystemPath().getValue());
}
public void testNoChooseFileIntentionForNonSystemDependency() throws Throwable {
public void testNoChooseFileIntentionForNonSystemDependency() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -757,7 +757,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertNull(action);
}
public void testTypeCompletion() throws Exception {
public void testTypeCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -771,7 +771,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertCompletionVariants(myProjectPom, "jar", "test-jar", "pom", "ear", "ejb", "ejb-client", "war", "bundle", "jboss-har", "jboss-sar", "maven-plugin");
}
public void testDoNotHighlightUnknownType() throws Throwable {
public void testDoNotHighlightUnknownType() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -788,7 +788,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting(myProjectPom);
}
public void testScopeCompletion() throws Exception {
public void testScopeCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -802,7 +802,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertCompletionVariants(myProjectPom, "compile", "provided", "runtime", "test", "system");
}
public void testDoNotHighlightUnknownScopes() throws Throwable {
public void testDoNotHighlightUnknownScopes() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -819,7 +819,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting(myProjectPom);
}
public void testPropertiesInScopes() throws Throwable {
public void testPropertiesInScopes() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -840,7 +840,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting(myProjectPom);
}
public void testDoesNotHighlightCorrectValues() throws Throwable {
public void testDoesNotHighlightCorrectValues() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -856,7 +856,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testHighlightingArtifactIdAndVersionIfGroupIsUnknown() throws Throwable {
public void testHighlightingArtifactIdAndVersionIfGroupIsUnknown() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -872,7 +872,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testHighlightingArtifactAndVersionIfGroupIsEmpty() throws Throwable {
public void testHighlightingArtifactAndVersionIfGroupIsEmpty() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -888,7 +888,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testHighlightingVersionAndArtifactIfArtifactTheyAreFromAnotherGroup() throws Throwable {
public void testHighlightingVersionAndArtifactIfArtifactTheyAreFromAnotherGroup() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -904,7 +904,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testHighlightingVersionIfArtifactIsEmpty() throws Throwable {
public void testHighlightingVersionIfArtifactIsEmpty() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -920,7 +920,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testHighlightingVersionIfArtifactIsUnknown() throws Throwable {
public void testHighlightingVersionIfArtifactIsUnknown() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -936,7 +936,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testHighlightingVersionItIsFromAnotherGroup() throws Throwable {
public void testHighlightingVersionItIsFromAnotherGroup() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -952,7 +952,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testHighlightingCoordinatesWithClosedTags() throws Throwable {
public void testHighlightingCoordinatesWithClosedTags() {
if (ignore()) return;
createProjectPom("<groupId>test</groupId>" +
@@ -970,7 +970,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testHandlingProperties() throws Throwable {
public void testHandlingProperties() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -999,7 +999,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testHandlingPropertiesWhenProjectIsNotYetLoaded() throws Throwable {
public void testHandlingPropertiesWhenProjectIsNotYetLoaded() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1021,7 +1021,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testDontHighlightProblemsInNonManagedPom1() throws Throwable {
public void testDontHighlightProblemsInNonManagedPom1() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1051,7 +1051,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting(m, true, false, true);
}
public void testDontHighlightProblemsInNonManagedPom2() throws Throwable {
public void testDontHighlightProblemsInNonManagedPom2() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1076,7 +1076,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting(m, true, false, true);
}
public void testUpdateIndicesIntention() throws Throwable {
public void testUpdateIndicesIntention() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1090,7 +1090,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertNotNull(getIntentionAtCaret("Update Maven Indices"));
}
public void testExclusionCompletion() throws Exception {
public void testExclusionCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1111,7 +1111,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
assertCompletionVariants(myProjectPom, "jmock");
}
public void testDoNotHighlightUnknownExclusions() throws Throwable {
public void testDoNotHighlightUnknownExclusions() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1132,7 +1132,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testExclusionHighlightingAbsentGroupId() throws Throwable {
public void testExclusionHighlightingAbsentGroupId() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1152,7 +1152,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
checkHighlighting();
}
public void testExclusionHighlightingAbsentArtifactId() throws Throwable {
public void testExclusionHighlightingAbsentArtifactId() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -3,7 +3,6 @@ package org.jetbrains.idea.maven.dom;
import com.intellij.codeInsight.completion.CompletionType;
import com.intellij.codeInsight.lookup.LookupElement;
import java.io.IOException;
import java.util.Arrays;
/**
@@ -11,7 +10,7 @@ import java.util.Arrays;
*/
public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestCase {
public void testCompletion() throws IOException {
public void testCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -25,7 +24,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC
assertCompletionVariantsInclude(myProjectPom, "junit:junit");
}
public void testInsertDependency() throws IOException {
public void testInsertDependency() {
createProjectPom("<groupId>test</groupId>\n" +
"<artifactId>project</artifactId>\n" +
"<version>1</version>\n" +
@@ -51,7 +50,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC
"</dependencies>\n"));
}
public void testInsertManagedDependency() throws IOException {
public void testInsertManagedDependency() {
createProjectPom("<groupId>test</groupId>\n" +
"<artifactId>project</artifactId>\n" +
"<version>1</version>\n" +
@@ -93,7 +92,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC
"</dependencies>\n"));
}
public void testInsertManagedDependencyWithTypeAndClassifier() throws IOException {
public void testInsertManagedDependencyWithTypeAndClassifier() {
createProjectPom("<groupId>test</groupId>\n" +
"<artifactId>project</artifactId>\n" +
"<version>1</version>\n" +
@@ -151,7 +150,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC
"</dependencies>\n"));
}
public void testCompletionArtifactIdThenVersion() throws IOException {
public void testCompletionArtifactIdThenVersion() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -188,7 +187,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC
myFixture.getLookupElementStrings().containsAll(Arrays.asList("3.8.1", "4.0"));
}
public void testCompletionArtifactIdThenGroupIdThenInsertVersion() throws IOException {
public void testCompletionArtifactIdThenGroupIdThenInsertVersion() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -227,7 +226,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC
"</dependencies>\n"));
}
public void testCompletionArtifactIdThenGroupIdThenCompleteVersion() throws IOException {
public void testCompletionArtifactIdThenGroupIdThenCompleteVersion() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -268,7 +267,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC
myFixture.getLookupElementStrings().equals(Arrays.asList("3.3", "3.3.1"));
}
public void testCompletionArtifactIdWithFullInsert() throws IOException {
public void testCompletionArtifactIdWithFullInsert() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -303,7 +302,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC
"</dependencies>\n"));
}
public void testCompletionArtifactIdInsideManagedDependency() throws IOException {
public void testCompletionArtifactIdInsideManagedDependency() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -341,7 +340,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC
"</dependencyManagement>\n"));
}
public void testCompletionArtifactIdWithManagedDependency() throws IOException {
public void testCompletionArtifactIdWithManagedDependency() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>\n" +
@@ -404,7 +403,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC
));
}
public void testCompletionGroupIdWithManagedDependencyWithTypeAndClassifier() throws IOException {
public void testCompletionGroupIdWithManagedDependencyWithTypeAndClassifier() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>\n" +
@@ -42,7 +42,7 @@ public class MavenDependencySpecialVersionsCompletionAndResolutionTest extends M
// assertResolved(myProjectPom, findPsiFile(f));
//}
public void testDoNotHighlightVersionRanges() throws Throwable {
public void testDoNotHighlightVersionRanges() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -58,7 +58,7 @@ public class MavenDependencySpecialVersionsCompletionAndResolutionTest extends M
checkHighlighting();
}
public void testDoNotHighlightLatestAndReleaseDependencies() throws Throwable {
public void testDoNotHighlightLatestAndReleaseDependencies() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -20,7 +20,7 @@ package org.jetbrains.idea.maven.dom;
*/
public class MavenDomSoftReferencesInParentTest extends MavenDomTestCase {
public void testDoNotHighlightSourceDirectoryInParentPom() throws Throwable {
public void testDoNotHighlightSourceDirectoryInParentPom() {
importProject("<groupId>test</groupId>\n" +
"<artifactId>project</artifactId>\n" +
"<version>1</version>\n" +
@@ -36,7 +36,7 @@ public class MavenDomSoftReferencesInParentTest extends MavenDomTestCase {
checkHighlighting();
}
public void testHighlightSourceDirectory() throws Throwable {
public void testHighlightSourceDirectory() {
importProject("<groupId>test</groupId>\n" +
"<artifactId>project</artifactId>\n" +
"<version>1</version>\n" +
@@ -107,7 +107,7 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase {
myFixture.type(c);
}
protected PsiReference getReferenceAtCaret(VirtualFile f) throws IOException {
protected PsiReference getReferenceAtCaret(VirtualFile f) {
configTest(f);
return findPsiFile(f).findReferenceAt(getEditorOffset(f));
}
@@ -117,7 +117,7 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase {
return findPsiFile(f).findReferenceAt(offset);
}
protected PsiElement getElementAtCaret(VirtualFile f) throws IOException {
protected PsiElement getElementAtCaret(VirtualFile f) {
configTest(f);
return findPsiFile(f).findElementAt(getEditorOffset(f));
}
@@ -131,7 +131,7 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase {
return myFixture.getEditor();
}
protected int getEditorOffset() throws IOException {
protected int getEditorOffset() {
return getEditorOffset(myProjectPom);
}
@@ -162,7 +162,7 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase {
return MavenDomUtil.findTag(model, path);
}
protected void assertNoReferences(VirtualFile file, Class refClass) throws IOException {
protected void assertNoReferences(VirtualFile file, Class refClass) {
PsiReference ref = getReferenceAtCaret(file);
if (ref == null) return;
PsiReference[] refs = ref instanceof PsiMultiReference ? ((PsiMultiReference)ref).getReferences() : new PsiReference[]{ref};
@@ -171,13 +171,13 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase {
}
}
protected void assertUnresolved(VirtualFile file) throws IOException {
protected void assertUnresolved(VirtualFile file) {
PsiReference ref = getReferenceAtCaret(file);
assertNotNull(ref);
assertNull(ref.resolve());
}
protected void assertUnresolved(VirtualFile file, String expectedText) throws IOException {
protected void assertUnresolved(VirtualFile file, String expectedText) {
PsiReference ref = getReferenceAtCaret(file);
assertNotNull(ref);
assertNull(ref.resolve());
@@ -231,7 +231,7 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase {
assertEquals(expectedText, ref.getCanonicalText());
}
private PsiReference doAssertResolved(VirtualFile file, PsiElement expected) throws IOException {
private PsiReference doAssertResolved(VirtualFile file, PsiElement expected) {
assertNotNull("expected reference is null", expected);
PsiReference ref = getReferenceAtCaret(file);
@@ -268,7 +268,7 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase {
return result;
}
protected void assertDocumentation(String expectedText) throws IOException {
protected void assertDocumentation(String expectedText) {
PsiElement originalElement = getElementAtCaret(myProjectPom);
PsiElement targetElement = DocumentationManager.getInstance(myProject)
.findTargetElement(getEditor(), getTestPsiFile(), originalElement);
@@ -283,7 +283,7 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase {
assertSame(targetElement, lookupElement);
}
protected void checkHighlighting() throws IOException {
protected void checkHighlighting() {
checkHighlighting(myProjectPom);
}
@@ -322,7 +322,7 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase {
assertEquals(createPomXml(expectedXml), getTestPsiFile(myProjectPom).getText());
}
protected void doRename(final VirtualFile f, String value) throws IOException {
protected void doRename(final VirtualFile f, String value) {
final MapDataContext context = createRenameDataContext(f, value);
final RenameHandler renameHandler = RenameHandlerRegistry.getInstance().getRenameHandler(context);
assertNotNull(renameHandler);
@@ -330,7 +330,7 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase {
invokeRename(context, renameHandler);
}
protected void assertCannotRename() throws Exception {
protected void assertCannotRename() {
MapDataContext context = createRenameDataContext(myProjectPom, "new name");
RenameHandler handler = RenameHandlerRegistry.getInstance().getRenameHandler(context);
if (handler == null) return;
@@ -358,21 +358,21 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase {
return context;
}
private MapDataContext createRenameDataContext(VirtualFile f, String value) throws IOException {
private MapDataContext createRenameDataContext(VirtualFile f, String value) {
MapDataContext context = createDataContext(f);
context.put(PsiElementRenameHandler.DEFAULT_NAME, value);
return context;
}
protected void assertSearchResults(VirtualFile file, PsiElement... expected) throws IOException {
protected void assertSearchResults(VirtualFile file, PsiElement... expected) {
assertUnorderedElementsAreEqual(search(file), expected);
}
protected void assertSearchResultsInclude(VirtualFile file, PsiElement... expected) throws IOException {
protected void assertSearchResultsInclude(VirtualFile file, PsiElement... expected) {
assertContain(search(file), expected);
}
protected List<PsiElement> search(VirtualFile file) throws IOException {
protected List<PsiElement> search(VirtualFile file) {
final MapDataContext context = createDataContext(file);
UsageTarget[] targets = UsageTargetUtil.findUsageTargets(new DataProvider() {
@Override
@@ -40,7 +40,7 @@ public class MavenExtensionCompletionAndResolutionTest extends MavenDomWithIndic
"<version>1</version>");
}
public void testGroupIdCompletion() throws Exception {
public void testGroupIdCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -56,7 +56,7 @@ public class MavenExtensionCompletionAndResolutionTest extends MavenDomWithIndic
assertCompletionVariants(myProjectPom, "org.codehaus.plexus", "test", "org.apache.maven.plugins", "org.codehaus.mojo", "intellij.test");
}
public void testArtifactIdCompletion() throws Exception {
public void testArtifactIdCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -92,7 +92,7 @@ public class MavenExtensionCompletionAndResolutionTest extends MavenDomWithIndic
}
}
public void testArtifactWithoutGroupCompletion() throws Exception {
public void testArtifactWithoutGroupCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -138,7 +138,7 @@ public class MavenExtensionCompletionAndResolutionTest extends MavenDomWithIndic
assertResolved(myProjectPom, findPsiFile(f));
}
public void testResolvingAbsentPlugins() throws Exception {
public void testResolvingAbsentPlugins() {
removeFromLocalRepository("org/apache/maven/plugins/maven-compiler-plugin");
createProjectPom("<groupId>test</groupId>" +
@@ -158,7 +158,7 @@ public class MavenExtensionCompletionAndResolutionTest extends MavenDomWithIndic
ref.resolve(); // shouldn't throw;
}
public void testDoNotHighlightAbsentGroupIdAndVersion() throws Throwable {
public void testDoNotHighlightAbsentGroupIdAndVersion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -173,7 +173,7 @@ public class MavenExtensionCompletionAndResolutionTest extends MavenDomWithIndic
checkHighlighting();
}
public void testHighlightingAbsentArtifactId() throws Throwable {
public void testHighlightingAbsentArtifactId() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -559,7 +559,7 @@ public class MavenFilteredPropertiesCompletionAndResolutionTest extends MavenDom
assertNotNull(resolveReference(f, "pom.baseUri"));
}
public void testDoNotAddReferenceToDelimiterDefinition() throws Exception {
public void testDoNotAddReferenceToDelimiterDefinition() {
importProject("<groupId>test</groupId>\n" +
"<artifactId>project</artifactId>\n" +
"<version>1</version>\n" +
@@ -43,7 +43,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase {
assertCompletionVariants(modulePom, "src", "module1", "pom.xml");
}
public void testRelativePathDefaultValue() throws Exception {
public void testRelativePathDefaultValue() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -63,7 +63,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase {
assertEquals(((PsiFile)elementAtCaret).getVirtualFile(), myProjectPom);
}
public void testUnderstandingProjectSchemaWithoutNamespace() throws Exception {
public void testUnderstandingProjectSchemaWithoutNamespace() {
myFixture.saveText(myProjectPom,
"<project>" +
" <dep<caret>" +
@@ -72,7 +72,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase {
assertCompletionVariants(myProjectPom, "dependencies", "dependencyManagement");
}
public void testUnderstandingProfilesSchemaWithoutNamespace() throws Exception {
public void testUnderstandingProfilesSchemaWithoutNamespace() {
VirtualFile profiles = createProfilesXml("<profile>" +
" <<caret>" +
"</profile>");
@@ -90,7 +90,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase {
assertCompletionVariantsInclude(settings, "id", "activation");
}
public void testAbsentModelVersion() throws Throwable {
public void testAbsentModelVersion() {
myFixture.saveText(myProjectPom,
"<<error descr=\"'modelVersion' child tag should be defined\">project</error> xmlns=\"http://maven.apache.org/POM/4.0.0\"" +
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" +
@@ -100,7 +100,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase {
checkHighlighting();
}
public void testAbsentArtifactId() throws Throwable {
public void testAbsentArtifactId() {
myFixture.saveText(myProjectPom,
"<<error descr=\"'artifactId' child tag should be defined\">project</error> xmlns=\"http://maven.apache.org/POM/4.0.0\"" +
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" +
@@ -110,7 +110,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase {
checkHighlighting();
}
public void testUnknownModelVersion() throws Throwable {
public void testUnknownModelVersion() {
myFixture.saveText(myProjectPom,
"<project xmlns=\"http://maven.apache.org/POM/4.0.0\"" +
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" +
@@ -121,7 +121,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase {
checkHighlighting();
}
public void testEmptyValues() throws Throwable {
public void testEmptyValues() {
createProjectPom("<<error>groupId</error>></groupId>" +
"<<error>artifactId</error>></artifactId>" +
"<<error>version</error>></version>");
@@ -150,7 +150,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase {
checkHighlighting();
}
public void testAddingProfilesXmlReadingProblemsToProjectTag() throws Exception {
public void testAddingProfilesXmlReadingProblemsToProjectTag() {
myFixture.saveText(myProjectPom,
"<project>" +
" <modelVersion>4.0.0</modelVersion>" +
@@ -203,7 +203,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase {
checkHighlighting(myProjectPom, true, false, true);
}
public void testAddingParentReadingProblemsToParentTag() throws Exception {
public void testAddingParentReadingProblemsToParentTag() {
createModulePom("parent",
"<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
@@ -241,7 +241,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase {
checkHighlighting();
}
public void testDoNotAddReadingSyntaxProblemsToProjectTag() throws Exception {
public void testDoNotAddReadingSyntaxProblemsToProjectTag() {
myFixture.saveText(myProjectPom,
"<project>" +
" <modelVersion>4.0.0</modelVersion>" +
@@ -264,7 +264,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase {
checkHighlighting();
}
public void testDoNotAddDependencyAndModuleProblemsToProjectTag() throws Exception {
public void testDoNotAddDependencyAndModuleProblemsToProjectTag() {
myFixture.saveText(myProjectPom,
"<project>" +
" <modelVersion>4.0.0</modelVersion>" +
@@ -20,7 +20,6 @@ import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiDocumentManager;
@@ -28,7 +27,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
private static final String CREATE_MODULE_INTENTION = MavenDomBundle.message("fix.create.module");
private static final String CREATE_MODULE_WITH_PARENT_INTENTION = MavenDomBundle.message("fix.create.module.with.parent");
public void testCompleteFromAllAvailableModules() throws Exception {
public void testCompleteFromAllAvailableModules() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -88,7 +87,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(module2Pom, "..", "../m1", "m3");
}
public void testDoesNotCompeteIfThereIsNoModules() throws Exception {
public void testDoesNotCompeteIfThereIsNoModules() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -107,7 +106,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom);
}
public void testIncludesAllThePomsAvailable() throws Exception {
public void testIncludesAllThePomsAvailable() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -287,7 +286,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
assertResolved(myProjectPom, findTag(myProjectPom, "project.properties.dirName"));
}
public void testCreatePomQuickFix() throws Throwable {
public void testCreatePomQuickFix() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -324,7 +323,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
"</project>");
}
public void testCreatePomQuickFixCustomPomFileName() throws Exception {
public void testCreatePomQuickFixCustomPomFileName() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -399,7 +398,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
"</project>");
}
public void testCreatePomQuickFixTakesGroupAndVersionFromSuperParent() throws Throwable {
public void testCreatePomQuickFixTakesGroupAndVersionFromSuperParent() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -440,7 +439,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
"</project>");
}
public void testCreatePomQuickFixWithProperties() throws Throwable {
public void testCreatePomQuickFixWithProperties() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -468,7 +467,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
assertNotNull(pom);
}
public void testCreatePomQuickFixTakesDefaultGroupAndVersionIfNothingToOffer() throws Throwable {
public void testCreatePomQuickFixTakesDefaultGroupAndVersionIfNothingToOffer() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -502,7 +501,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
"</project>");
}
public void testCreateModuleWithParentQuickFix() throws Throwable {
public void testCreateModuleWithParentQuickFix() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -544,7 +543,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
"</project>");
}
public void testCreateModuleWithParentQuickFix2() throws Throwable {
public void testCreateModuleWithParentQuickFix2() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -587,7 +586,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
"</project>");
}
public void testCreateModuleWithParentQuickFix3() throws Throwable {
public void testCreateModuleWithParentQuickFix3() {
VirtualFile parentPom = createModulePom("parent",
"<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
@@ -633,7 +632,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
"</project>");
}
public void testDoesNotShowCreatePomQuickFixForEmptyModuleTag() throws Throwable {
public void testDoesNotShowCreatePomQuickFixForEmptyModuleTag() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -652,7 +651,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT
assertNull(getIntentionAtCaret(CREATE_MODULE_INTENTION));
}
public void testDoesNotShowCreatePomQuickFixExistingModule() throws Throwable {
public void testDoesNotShowCreatePomQuickFixExistingModule() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -29,7 +29,7 @@ public class MavenNotManagedProjectInspectionsTest extends MavenDomTestCase {
setRepositoryPath(new File(myDir, "repo").getPath());
}
public void testWorkForNonMavenProjects() throws Throwable {
public void testWorkForNonMavenProjects() {
Module m = createModule("module");
PsiTestUtil.addContentRoot(m, myProjectRoot);
@@ -53,7 +53,7 @@ public class MavenNotManagedProjectInspectionsTest extends MavenDomTestCase {
checkHighlighting(); // should not fail nor highlight errors
}
public void testEnablingInspectionForNonMavenProjectsAfterImport() throws Throwable {
public void testEnablingInspectionForNonMavenProjectsAfterImport() {
if (ignore()) return;
// can not reproduce in tests because of StartupManager.runWhenProjectIsInitialized
// relies on ProjectManager.isProjectOpen. In tests the project is never being opened.
@@ -16,7 +16,7 @@
package org.jetbrains.idea.maven.dom;
public class MavenPackagingCompletionTest extends MavenDomTestCase {
public void testVariants() throws Exception {
public void testVariants() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -30,7 +30,7 @@ public class MavenPackagingCompletionTest extends MavenDomTestCase {
assertCompletionVariants(myProjectPom, "jar", "pom", "war", "ejb", "ejb-client", "ear", "bundle", "maven-plugin");
}
public void testDoNotHighlightUnknownPackagingTypes() throws Throwable {
public void testDoNotHighlightUnknownPackagingTypes() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -22,7 +22,7 @@ import com.intellij.psi.ElementManipulators;
import com.intellij.psi.PsiElement;
public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesTestCase {
public void testVariants() throws Exception {
public void testVariants() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -181,7 +181,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT
assertResolved(myProjectPom, findPsiFile(parent));
}
public void testDoNotHighlightResolvedParentByRelativePathWhenOutsideOfTheProject() throws Throwable {
public void testDoNotHighlightResolvedParentByRelativePathWhenOutsideOfTheProject() {
createPomFile(myProjectRoot.getParent(),
"<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
@@ -204,7 +204,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting(myProjectPom);
}
public void testRelativePathCompletion() throws Throwable {
public void testRelativePathCompletion() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -233,7 +233,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom, "dir", "two", "pom.xml");
}
public void testRelativePathCompletion_2() throws Throwable {
public void testRelativePathCompletion_2() {
importProject("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>");
createProjectPom("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>" +
@@ -253,7 +253,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom, "one", "two", "pom.xml");
}
public void testHighlightingUnknownValues() throws Throwable {
public void testHighlightingUnknownValues() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -271,7 +271,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testHighlightingAbsentGroupId() throws Throwable {
public void testHighlightingAbsentGroupId() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -283,7 +283,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testHighlightingAbsentArtifactId() throws Throwable {
public void testHighlightingAbsentArtifactId() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -295,7 +295,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testHighlightingAbsentVersion() throws Throwable {
public void testHighlightingAbsentVersion() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -307,7 +307,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testHighlightingInvalidRelativePath() throws Throwable {
public void testHighlightingInvalidRelativePath() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -326,7 +326,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testPathQuickFixForInvalidValue() throws Throwable {
public void testPathQuickFixForInvalidValue() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -358,7 +358,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT
assertEquals("bar/pom.xml", ElementManipulators.getValueText(el));
}
public void testDoNotShowPathQuickFixForValidPath() throws Throwable {
public void testDoNotShowPathQuickFixForValidPath() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -22,7 +22,6 @@ import com.intellij.psi.PsiReference;
import com.intellij.psi.xml.XmlTag;
import org.jetbrains.idea.maven.indices.MavenIndicesTestFixture;
import java.io.IOException;
import java.util.List;
public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesTestCase {
@@ -40,7 +39,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
"<version>1</version>");
}
public void testGroupIdCompletion() throws Exception {
public void testGroupIdCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -56,7 +55,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom, "org.codehaus.plexus", "intellij.test", "test", "org.apache.maven.plugins", "org.codehaus.mojo");
}
public void testArtifactIdCompletion() throws Exception {
public void testArtifactIdCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -75,7 +74,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
"maven-compiler-plugin", "maven-deploy-plugin");
}
public void testVersionCompletion() throws Exception {
public void testVersionCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -93,7 +92,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom, "RELEASE", "LATEST", "2.0.2", "3.1");
}
public void testArtifactWithoutGroupCompletion() throws Exception {
public void testArtifactWithoutGroupCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -112,7 +111,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
"maven-install-plugin", "maven-compiler-plugin", "maven-deploy-plugin");
}
public void testVersionWithoutGroupCompletion() throws Exception {
public void testVersionWithoutGroupCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -148,7 +147,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertResolved(myProjectPom, findPsiFile(f));
}
public void testResolvingAbsentPlugins() throws Exception {
public void testResolvingAbsentPlugins() {
removeFromLocalRepository("org/apache/maven/plugins/maven-compiler-plugin");
createProjectPom("<groupId>test</groupId>" +
@@ -168,7 +167,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
ref.resolve(); // shouldn't throw;
}
public void testDoNotHighlightAbsentGroupIdAndVersion() throws Throwable {
public void testDoNotHighlightAbsentGroupIdAndVersion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -183,7 +182,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testHighlightingAbsentArtifactId() throws Throwable {
public void testHighlightingAbsentArtifactId() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -198,17 +197,17 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testBasicConfigurationCompletion() throws Exception {
public void testBasicConfigurationCompletion() {
putCaretInConfigurationSection();
assertCompletionVariantsInclude(myProjectPom, "source", "target");
}
public void testIncludingConfigurationParametersFromAllTheMojos() throws Exception {
public void testIncludingConfigurationParametersFromAllTheMojos() {
putCaretInConfigurationSection();
assertCompletionVariantsInclude(myProjectPom, "excludes", "testExcludes");
}
private void putCaretInConfigurationSection() throws IOException {
private void putCaretInConfigurationSection() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -225,7 +224,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
"</build>");
}
public void testNoParametersForUnknownPlugin() throws Exception {
public void testNoParametersForUnknownPlugin() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -244,7 +243,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom);
}
public void testNoParametersIfNothingIsSpecified() throws Exception {
public void testNoParametersIfNothingIsSpecified() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -262,7 +261,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom);
}
public void testResolvingParamaters() throws Exception {
public void testResolvingParamaters() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -287,7 +286,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertEquals("includes", ((XmlTag)resolved).findFirstSubTag("name").getValue().getText());
}
public void testResolvingInnerParamatersIntoOuter() throws Exception {
public void testResolvingInnerParamatersIntoOuter() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -314,7 +313,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertEquals("includes", ((XmlTag)resolved).findFirstSubTag("name").getValue().getText());
}
public void testGoalsCompletionAndHighlighting() throws Throwable {
public void testGoalsCompletionAndHighlighting() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -358,7 +357,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testDontHighlightGoalsForUnresolvedPlugin() throws Throwable {
public void testDontHighlightGoalsForUnresolvedPlugin() {
createProjectPom("<groupId>test</groupId>\n" +
"<artifactId>project</artifactId>\n" +
"<version>1</version>\n" +
@@ -393,7 +392,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testGoalsCompletionAndHighlightingInPluginManagement() throws Throwable {
public void testGoalsCompletionAndHighlightingInPluginManagement() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -441,7 +440,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testGoalsResolution() throws Throwable {
public void testGoalsResolution() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -515,7 +514,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertUnresolved(myProjectPom);
}
public void testPhaseCompletionAndHighlighting() throws Throwable {
public void testPhaseCompletionAndHighlighting() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -555,7 +554,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testNoExecutionParametersIfNoGoalNorIdAreSpecified() throws Exception {
public void testNoExecutionParametersIfNoGoalNorIdAreSpecified() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -578,7 +577,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom);
}
public void testExecutionParametersForSpecificGoal() throws Exception {
public void testExecutionParametersForSpecificGoal() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -606,7 +605,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertFalse(variants.toString(), variants.contains("testExcludes"));
}
public void testExecutionParametersForDefaultGoalExecution() throws Exception {
public void testExecutionParametersForDefaultGoalExecution() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -632,7 +631,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertFalse(variants.toString(), variants.contains("testExcludes"));
}
public void testExecutionParametersForSeveralSpecificGoals() throws Exception {
public void testExecutionParametersForSeveralSpecificGoals() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -659,7 +658,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariantsInclude(myProjectPom, "excludes", "testExcludes");
}
public void testAliasCompletion() throws Exception {
public void testAliasCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -678,7 +677,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariantsInclude(myProjectPom, "warSourceExcludes", "excludes");
}
public void testListElementsCompletion() throws Exception {
public void testListElementsCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -700,7 +699,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom, "exclude");
}
public void testListElementWhatHasUnpluralizedNameCompletion() throws Exception {
public void testListElementWhatHasUnpluralizedNameCompletion() {
// NPE test - StringUtil.unpluralize returns null.
createProjectPom("<groupId>test</groupId>" +
@@ -723,7 +722,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom, "additionalConfig", "config");
}
public void testDoNotHighlightUnknownElementsUnderLists() throws Throwable {
public void testDoNotHighlightUnknownElementsUnderLists() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -744,7 +743,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testArrayElementsCompletion() throws Exception {
public void testArrayElementsCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -766,7 +765,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom, "resource", "webResource");
}
public void testCompletionInCustomObjects() throws Exception {
public void testCompletionInCustomObjects() {
if (ignore()) return;
createProjectPom("<groupId>test</groupId>" +
@@ -810,7 +809,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertDocumentation("Type: <b>java.lang.String</b><br>Expression: <b>${maven.compiler.source}</b><br><br><i>The -source argument for the Java compiler.</i>");
}
public void testDoNotCompleteNorHighlightNonPluginConfiguration() throws Throwable {
public void testDoNotCompleteNorHighlightNonPluginConfiguration() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -830,7 +829,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testDoNotHighlightInnerParameters() throws Throwable {
public void testDoNotHighlightInnerParameters() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -851,7 +850,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testDoNotHighlightRequiredParametersWithDefaultValues() throws Throwable {
public void testDoNotHighlightRequiredParametersWithDefaultValues() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -871,7 +870,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting(); // surefire plugin has several required parameters with default values.
}
public void testDoNotHighlightInnerParameterAttributes() throws Throwable {
public void testDoNotHighlightInnerParameterAttributes() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -895,7 +894,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testDoNotCompleteParameterAttributes() throws Throwable {
public void testDoNotCompleteParameterAttributes() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -914,7 +913,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
assertCompletionVariants(myProjectPom, "combine.children", "combine.self");
}
public void testWorksWithPropertiesInPluginId() throws Throwable {
public void testWorksWithPropertiesInPluginId() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -952,7 +951,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testDoNotHighlightPropertiesForUnknownPlugins() throws Throwable {
public void testDoNotHighlightPropertiesForUnknownPlugins() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -973,7 +972,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT
checkHighlighting();
}
public void testTellNobodyThatIdeaIsRulezzz() throws Exception {
public void testTellNobodyThatIdeaIsRulezzz() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -736,7 +736,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase {
assertResolved(myProjectPom, MavenPropertiesVirtualFileSystem.getInstance().findEnvProperty(myProject, getEnvVar()).getPsiElement());
}
public void testUpperCaseEnvPropertiesOnWindows() throws Exception {
public void testUpperCaseEnvPropertiesOnWindows() {
if (!SystemInfo.isWindows) return;
createProjectPom("<groupId>test</groupId>" +
@@ -776,7 +776,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase {
assertUnresolved(myProjectPom);
}
public void testHighlightUnresolvedProperties() throws Exception {
public void testHighlightUnresolvedProperties() {
createProjectPom("<groupId>test</groupId>\n" +
"<artifactId>child</artifactId>\n" +
"<version>1</version>\n" +
@@ -898,7 +898,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase {
assertContain(variants, "user.home", "env." + getEnvVar());
}
public void testDoNotIncludeCollectionPropertiesInCompletion() throws Exception {
public void testDoNotIncludeCollectionPropertiesInCompletion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -906,7 +906,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase {
assertCompletionVariantsDoNotInclude(myProjectPom, "project.dependencies", "env.\\=C\\:", "idea.config.path");
}
public void testCompletingAfterOpenBrace() throws Exception {
public void testCompletingAfterOpenBrace() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -915,7 +915,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase {
assertCompletionVariantsInclude(myProjectPom, "project.groupId", "groupId");
}
public void testCompletingAfterOpenBraceInOpenTag() throws Exception {
public void testCompletingAfterOpenBraceInOpenTag() {
if (ignore()) return;
createProjectPom("<groupId>test</groupId>" +
@@ -926,7 +926,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase {
assertCompletionVariantsInclude(myProjectPom, "project.groupId", "groupId");
}
public void testCompletingAfterOpenBraceAndSomeText() throws Exception {
public void testCompletingAfterOpenBraceAndSomeText() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -937,7 +937,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase {
assertDoNotContain(variants, "groupId");
}
public void testCompletingAfterOpenBraceAndSomeTextWithDot() throws Exception {
public void testCompletingAfterOpenBraceAndSomeTextWithDot() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -948,7 +948,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase {
assertDoNotContain(variants, "project.name");
}
public void testDoNotCompleteAfterNonWordCharacter() throws Exception {
public void testDoNotCompleteAfterNonWordCharacter() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -135,7 +135,7 @@ public class MavenPropertyFindUsagesTest extends MavenDomTestCase {
assertContain(result, findTag("project.name"), MavenDomUtil.findPropertyValue(myProject, f, "foo"));
}
public void testHighlightingFromTag() throws Exception {
public void testHighlightingFromTag() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>module1</artifactId>" +
"<<caret>version>1</version>" +
@@ -46,7 +46,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
}
public void testResolvingProjectAttributes() throws Exception {
public void testResolvingProjectAttributes() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -55,7 +55,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals("test", resolve("${pom.groupId}", myProjectPom));
}
public void testResolvingProjectParentAttributes() throws Exception {
public void testResolvingProjectParentAttributes() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -70,7 +70,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals("parent.test", resolve("${pom.parent.groupId}", myProjectPom));
}
public void testResolvingAbsentProperties() throws Exception {
public void testResolvingAbsentProperties() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -78,7 +78,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals("${project.parent.groupId}", resolve("${project.parent.groupId}", myProjectPom));
}
public void testResolvingProjectDirectories() throws Exception {
public void testResolvingProjectDirectories() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -89,7 +89,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
resolve("${project.build.sourceDirectory}", myProjectPom));
}
public void testResolvingProjectAndParentProperties() throws Exception {
public void testResolvingProjectAndParentProperties() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -128,7 +128,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals("${pom.moduleProp}", resolve("${pom.moduleProp}", f));
}
public void testProjectPropertiesRecursively() throws Exception {
public void testProjectPropertiesRecursively() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -146,7 +146,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals("value-2-3", resolve("${prop3}", myProjectPom));
}
public void testDoNotGoIntoInfiniteRecursion() throws Exception {
public void testDoNotGoIntoInfiniteRecursion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -169,7 +169,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals("${prop5}", resolve("${prop5}", myProjectPom));
}
public void testSophisticatedPropertyNameDoesNotBreakResolver() throws Exception {
public void testSophisticatedPropertyNameDoesNotBreakResolver() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -178,7 +178,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals("${#ARRAY[@]}", resolve("${#ARRAY[@]}", myProjectPom));
}
public void testProjectPropertiesWithProfiles() throws Exception {
public void testProjectPropertiesWithProfiles() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -212,7 +212,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals("value3", resolve("${prop}", myProjectPom));
}
public void testResolvingBasedirProperties() throws Exception {
public void testResolvingBasedirProperties() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -222,7 +222,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals(getProjectPath(), resolve("${pom.basedir}", myProjectPom));
}
public void testResolvingSystemProperties() throws Exception {
public void testResolvingSystemProperties() {
String javaHome = System.getProperty("java.home");
String tempDir = System.getenv(getEnvVar());
@@ -234,7 +234,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals(tempDir, resolve("${env." + getEnvVar() + "}", myProjectPom));
}
public void testAllProperties() throws Exception {
public void testAllProperties() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -243,7 +243,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
resolve("foo ${project.groupId}-${project.artifactId} bar", myProjectPom));
}
public void testIncompleteProperties() throws Exception {
public void testIncompleteProperties() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -253,7 +253,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals("{project.groupId}", resolve("{project.groupId}", myProjectPom));
}
public void testUncomittedProperties() throws Exception {
public void testUncomittedProperties() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -272,7 +272,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase {
assertEquals("value", resolve("${uncomitted}", myProjectPom));
}
public void testEscapingProperties() throws Exception {
public void testEscapingProperties() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -22,7 +22,7 @@ import com.intellij.spellchecker.inspections.SpellCheckingInspection;
*/
public class MavenSpellcheckerTest extends MavenDomTestCase {
public void testSpell() throws Exception {
public void testSpell() {
myFixture.enableInspections(SpellCheckingInspection.class);
createProjectPom("<groupId>test</groupId>\n" +
@@ -17,10 +17,8 @@ package org.jetbrains.idea.maven.dom;
import com.intellij.openapi.vfs.VirtualFile;
import java.io.IOException;
public class MavenTypingTest extends MavenDomTestCase {
public void testTypingOpenBrace() throws Exception {
public void testTypingOpenBrace() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -33,7 +31,7 @@ public class MavenTypingTest extends MavenDomTestCase {
"<name>${<caret>}</name>");
}
public void testTypingOpenBraceInsideOtherBrace() throws Exception {
public void testTypingOpenBraceInsideOtherBrace() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -46,7 +44,7 @@ public class MavenTypingTest extends MavenDomTestCase {
"<name>${{<caret></name>");
}
public void testTypingOpenBraceWithExistingClosedBrace() throws Exception {
public void testTypingOpenBraceWithExistingClosedBrace() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -59,7 +57,7 @@ public class MavenTypingTest extends MavenDomTestCase {
"<name>${<caret>}</name>");
}
public void testTypingOpenBraceBeforeChar() throws Exception {
public void testTypingOpenBraceBeforeChar() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -72,7 +70,7 @@ public class MavenTypingTest extends MavenDomTestCase {
"<name>${<caret>foo</name>");
}
public void testTypingOpenBraceBeforeWhitespace() throws Exception {
public void testTypingOpenBraceBeforeWhitespace() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -85,7 +83,7 @@ public class MavenTypingTest extends MavenDomTestCase {
"<name>${<caret>} foo</name>");
}
public void testTypingOpenBraceWithoutDollar() throws Exception {
public void testTypingOpenBraceWithoutDollar() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -114,7 +112,7 @@ public class MavenTypingTest extends MavenDomTestCase {
" <name>${<caret>}");
}
public void testTypingOpenBraceInsideTagDoesNothing() throws Exception {
public void testTypingOpenBraceInsideTagDoesNothing() {
if (ignore()) return;
createProjectPom("<groupId>test</groupId>" +
@@ -236,7 +234,7 @@ public class MavenTypingTest extends MavenDomTestCase {
" <name>$<caret>");
}
private void assertTypeResult(char c, String xml) throws IOException {
private void assertTypeResult(char c, String xml) {
assertTypeResultInRegularFile(myProjectPom, c, createPomXml(xml));
}
@@ -245,11 +243,11 @@ public class MavenTypingTest extends MavenDomTestCase {
myFixture.checkResult(expected);
}
private void assertBackspaceResult(String xml) throws IOException {
private void assertBackspaceResult(String xml) {
assertTypeResult('\b', xml);
}
private void assertBackspaceResultInRegularFile(VirtualFile f, String content) throws IOException {
private void assertBackspaceResultInRegularFile(VirtualFile f, String content) {
assertTypeResultInRegularFile(f, '\b', content);
}
}
@@ -159,7 +159,7 @@ public class MavenClasspathsAndSearchScopesTest extends MavenImportingTestCase {
getProjectPath() + "/m4/target/classes");
}
public void testDoNotIncludeTargetDirectoriesOfModuleDependenciesToLibraryClassesRoots() throws Exception {
public void testDoNotIncludeTargetDirectoriesOfModuleDependenciesToLibraryClassesRoots() {
VirtualFile m = createModulePom("m", "<groupId>test</groupId>" +
"<artifactId>m</artifactId>" +
"<version>1</version>" +
@@ -755,7 +755,7 @@ public class MavenClasspathsAndSearchScopesTest extends MavenImportingTestCase {
getRepositoryPath() + "/junit/junit/4.0/junit-4.0.jar");
}
public void testLibraryScopeForTwoDependentModules() throws IOException {
public void testLibraryScopeForTwoDependentModules() {
VirtualFile m1 = createModulePom("m1", "<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
"<version>1</version>" +
@@ -50,7 +50,7 @@ public class MavenExecutionTest extends MavenImportingTestCase {
new WriteAction<Object>() {
@Override
protected void run(@NotNull Result<Object> objectResult) throws Throwable {
protected void run(@NotNull Result<Object> objectResult) {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -69,7 +69,7 @@ public class MavenExecutionTest extends MavenImportingTestCase {
new WriteAction<Object>() {
@Override
protected void run(@NotNull Result<Object> objectResult) throws Throwable {
protected void run(@NotNull Result<Object> objectResult) {
createStdProjectFolders();
importProject("<groupId>test</groupId>" +
@@ -33,7 +33,7 @@ public class MavenJUnitPatcherTest extends MavenImportingTestCase {
MavenProjectSettings.getInstance(myProject).getTestRunningSettings().setPassSystemProperties(true);
}
public void testArgList() throws Exception {
public void testArgList() {
VirtualFile m1 = createModulePom("m1", "<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
"<version>1</version>" +
@@ -65,7 +65,7 @@ public class MavenJUnitPatcherTest extends MavenImportingTestCase {
javaParameters.getVMParametersList().getList());
}
public void testVmPropertiesResolve() throws Exception {
public void testVmPropertiesResolve() {
VirtualFile m1 = createModulePom("m1", "<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
"<version>1</version>" +
@@ -28,7 +28,7 @@ import java.util.Arrays;
import java.util.List;
public class ArtifactsDownloadingTest extends ArtifactsDownloadingTestCase {
public void testJavadocsAndSources() throws Exception {
public void testJavadocsAndSources() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -53,7 +53,7 @@ public class ArtifactsDownloadingTest extends ArtifactsDownloadingTestCase {
assertTrue(javadoc.exists());
}
public void testIgnoringOfflineSetting() throws Exception {
public void testIgnoringOfflineSetting() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -91,7 +91,7 @@ public class ArtifactsDownloadingTest extends ArtifactsDownloadingTestCase {
assertTrue(javadoc.exists());
}
public void testDownloadingSpecificDependency() throws Exception {
public void testDownloadingSpecificDependency() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -124,7 +124,7 @@ public class ArtifactsDownloadingTest extends ArtifactsDownloadingTestCase {
assertFalse(new File(getRepositoryPath(), "/junit/junit/4.0/junit-4.0-javadoc.jar").exists());
}
public void testReturningNotFoundArtifacts() throws Exception {
public void testReturningNotFoundArtifacts() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -150,7 +150,7 @@ public class ArtifactsDownloadingTest extends ArtifactsDownloadingTestCase {
assertUnorderedElementsAreEqual(unresolvedArtifacts.unresolvedDocs, new MavenId("lib", "xxx", "1"));
}
public void testJavadocsAndSourcesForTestDeps() throws Exception {
public void testJavadocsAndSourcesForTestDeps() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -253,7 +253,7 @@ public class ArtifactsDownloadingTest extends ArtifactsDownloadingTestCase {
}
}
public void testDownloadingPlugins() throws Exception {
public void testDownloadingPlugins() {
try {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
@@ -282,7 +282,7 @@ public class ArtifactsDownloadingTest extends ArtifactsDownloadingTestCase {
}
}
public void testDownloadBuildExtensionsOnResolve() throws Exception {
public void testDownloadBuildExtensionsOnResolve() {
File f = new File(getRepositoryPath(), "/org/apache/maven/wagon/wagon/1.0-alpha-6/wagon-1.0-alpha-6.pom");
assertFalse(f.exists());
@@ -39,7 +39,7 @@ import java.util.Collections;
import java.util.List;
public class DependenciesImportingTest extends MavenImportingTestCase {
public void testLibraryDependency() throws Exception {
public void testLibraryDependency() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -59,7 +59,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"jar://" + getRepositoryPath() + "/junit/junit/4.0/junit-4.0-javadoc.jar!/");
}
public void testSystemDependency() throws Exception {
public void testSystemDependency() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -80,7 +80,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
Collections.emptyList(), Collections.emptyList());
}
public void testTestJarDependencies() throws Exception {
public void testTestJarDependencies() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -101,7 +101,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"jar://" + getRepositoryPath() + "/junit/junit/4.0/junit-4.0-test-javadoc.jar!/");
}
public void testDependencyWithClassifier() throws Exception {
public void testDependencyWithClassifier() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -121,7 +121,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"jar://" + getRepositoryPath() + "/junit/junit/4.0/junit-4.0-javadoc.jar!/");
}
public void testSystemDependencyWithoutPath() throws Exception {
public void testSystemDependencyWithoutPath() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -139,7 +139,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("project"); // dependency was not added due to reported pom model problem.
}
public void testPreservingDependenciesOrder() throws Exception {
public void testPreservingDependenciesOrder() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -161,7 +161,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("project", "Maven: B:B:2", "Maven: A:A:1");
}
public void testDoNotResetDependenciesIfProjectIsInvalid() throws Exception {
public void testDoNotResetDependenciesIfProjectIsInvalid() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -193,7 +193,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("project", "Maven: group:lib:1");
}
public void testInterModuleDependencies() throws Exception {
public void testInterModuleDependencies() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -225,7 +225,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1", "m2");
}
public void testInterModuleDependenciesWithClassifier() throws Exception {
public void testInterModuleDependenciesWithClassifier() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -262,7 +262,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"jar://" + getRepositoryPath() + "/test/m2/1/m2-1-javadoc.jar!/");
}
public void testDoNotAddInterModuleDependenciesFoUnsupportedDependencyType() throws Exception {
public void testDoNotAddInterModuleDependenciesFoUnsupportedDependencyType() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -296,7 +296,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1");
}
public void testInterModuleDependenciesWithoutModuleVersions() throws Exception {
public void testInterModuleDependenciesWithoutModuleVersions() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -334,7 +334,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1", "m2");
}
public void testInterModuleDependenciesWithVersionRanges() throws Exception {
public void testInterModuleDependenciesWithVersionRanges() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -367,7 +367,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1", "m2");
}
public void testInterModuleDependenciesWithLatestVersion() throws Exception {
public void testInterModuleDependenciesWithLatestVersion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -404,7 +404,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertEquals(new MavenId("test", "m2", "1"), p.getDependencies().get(0).getMavenId());
}
public void testInterModuleDependenciesWithLatestVersionAreBeingSetupForSnapshots() throws Exception {
public void testInterModuleDependenciesWithLatestVersionAreBeingSetupForSnapshots() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -441,7 +441,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertEquals(new MavenId("test", "m2", "1-SNAPSHOT"), p.getDependencies().get(0).getMavenId());
}
public void testInterModuleDependenciesWithReleaseVersion() throws Exception {
public void testInterModuleDependenciesWithReleaseVersion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -478,7 +478,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertEquals(new MavenId("test", "m2", "1"), p.getDependencies().get(0).getMavenId());
}
public void testInterModuleDependenciesWithReleaseVersionAreNotBeingSetupForSnapshotDependencies() throws Exception {
public void testInterModuleDependenciesWithReleaseVersionAreNotBeingSetupForSnapshotDependencies() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -512,7 +512,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("m1", "Maven: test:m2:RELEASE");
}
public void testInterSnapshotModuleDependenciesWithSnapshotVersionRanges() throws Exception {
public void testInterSnapshotModuleDependenciesWithSnapshotVersionRanges() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -545,7 +545,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1", "m2");
}
public void testInterSnapshotModuleDependenciesWithVersionRanges() throws Exception {
public void testInterSnapshotModuleDependenciesWithVersionRanges() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -578,7 +578,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1", "m2");
}
public void testInterModuleDependenciesWithoutModuleGroup() throws Exception {
public void testInterModuleDependenciesWithoutModuleGroup() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -616,7 +616,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1", "m2");
}
public void testInterModuleDependenciesIfThereArePropertiesInArtifactHeader() throws Exception {
public void testInterModuleDependenciesIfThereArePropertiesInArtifactHeader() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -659,7 +659,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1", "m2");
}
public void testInterModuleDependenciesIfThereArePropertiesInArtifactHeaderDefinedInParent() throws Exception {
public void testInterModuleDependenciesIfThereArePropertiesInArtifactHeaderDefinedInParent() {
createProjectPom("<groupId>${groupProp}</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>${versionProp}</version>" +
@@ -705,7 +705,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1", "m2");
}
public void testDependencyOnSelf() throws Exception {
public void testDependencyOnSelf() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -721,7 +721,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("project");
}
public void testDependencyOnSelfWithPomPackaging() throws Exception {
public void testDependencyOnSelfWithPomPackaging() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -738,7 +738,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("project");
}
public void testIntermoduleDependencyOnTheSameModuleWithDifferentTypes() throws Exception {
public void testIntermoduleDependencyOnTheSameModuleWithDifferentTypes() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -777,7 +777,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1", "m2", "m2");
}
public void testDependencyScopes() throws Exception {
public void testDependencyScopes() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -807,7 +807,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDepScope("project", "Maven: test:foo3:1", DependencyScope.TEST);
}
public void testModuleDependencyScopes() throws Exception {
public void testModuleDependencyScopes() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -862,7 +862,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDepScope("m1", "m4", DependencyScope.TEST);
}
public void testDependenciesAreNotExported() throws Exception {
public void testDependenciesAreNotExported() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -898,7 +898,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertExportedDeps("m1");
}
public void testTransitiveDependencies() throws Exception {
public void testTransitiveDependencies() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -941,7 +941,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("m1", "Maven: group:id:1");
}
public void testTransitiveLibraryDependencyVersionResolution() throws Exception {
public void testTransitiveLibraryDependencyVersionResolution() {
// this test hanles the case when the particular dependency list cause embedder set
// the versionRange for the xml-apis:xml-apis:1.0.b2 artifact to null.
// see http://jira.codehaus.org/browse/MNG-3386
@@ -969,7 +969,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDep("project", "Maven: xml-apis:xml-apis:1.0.b2");
}
public void testExclusionOfTransitiveDependencies() throws Exception {
public void testExclusionOfTransitiveDependencies() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -1017,7 +1017,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("m1");
}
public void testDependencyWithEnvironmentProperty() throws Exception {
public void testDependencyWithEnvironmentProperty() {
String javaHome = FileUtil.toSystemIndependentName(System.getProperty("java.home"));
importProject("<groupId>test</groupId>" +
@@ -1040,7 +1040,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"jar://" + javaHome + "/lib/tools.jar!/");
}
public void testDependencyWithEnvironmentENVProperty() throws Exception {
public void testDependencyWithEnvironmentENVProperty() {
String envDir = FileUtil.toSystemIndependentName(System.getenv(getEnvVar()));
envDir = StringUtil.trimEnd(envDir, "/");
@@ -1064,7 +1064,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"jar://" + envDir + "/lib/tools.jar!/");
}
public void testDependencyWithVersionRangeOnModule() throws Exception {
public void testDependencyWithVersionRangeOnModule() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -1101,7 +1101,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("m1");
}
public void testPropertiesInInheritedDependencies() throws Exception {
public void testPropertiesInInheritedDependencies() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1134,7 +1134,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDep("m", "Maven: group:lib:2");
}
public void testPropertyInTheModuleDependency() throws Exception {
public void testPropertyInTheModuleDependency() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1172,7 +1172,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("m", "Maven: group:id:1.2.3");
}
public void testManagedModuleDependency() throws Exception {
public void testManagedModuleDependency() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1212,7 +1212,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("m", "Maven: group:id:1");
}
public void testPropertyInTheManagedModuleDependencyVersion() throws Exception {
public void testPropertyInTheManagedModuleDependencyVersion() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1258,7 +1258,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("m", "Maven: group:id:1");
}
public void testPomTypeDependency() throws Exception {
public void testPomTypeDependency() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1275,7 +1275,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
importProject(); // shouldn't throw any exception
}
public void testPropertyInTheManagedModuleDependencyVersionOfPomType() throws Exception {
public void testPropertyInTheManagedModuleDependencyVersionOfPomType() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1392,7 +1392,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertTrue(myProjectsTree.findProject(myProjectPom).hasUnresolvedArtifacts());
}
public void testCanResolveDependenciesWhenExtensionPluginNotFound() throws Exception {
public void testCanResolveDependenciesWhenExtensionPluginNotFound() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1419,7 +1419,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDep("project", "Maven: junit:junit:4.0");
}
public void testDoNotRemoveLibrariesOnImportIfProjectWasNotChanged() throws Exception {
public void testDoNotRemoveLibrariesOnImportIfProjectWasNotChanged() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1441,7 +1441,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("project", "Maven: junit:junit:4.0");
}
public void testDoNotCreateSameLibraryTwice() throws Exception {
public void testDoNotCreateSameLibraryTwice() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1460,7 +1460,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("project", "Maven: junit:junit:4.0");
}
public void testCreateSeparateLibraryForDifferentArtifactTypeAndClassifier() throws Exception {
public void testCreateSeparateLibraryForDifferentArtifactTypeAndClassifier() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1494,7 +1494,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"Maven: junit:junit:jdk5:4.0");
}
public void testDoNotResetUserLibraryDependencies() throws Exception {
public void testDoNotResetUserLibraryDependencies() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1522,7 +1522,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("project", "My Library", "Maven: junit:junit:4.0");
}
public void testDoNotResetUserModuleDependencies() throws Exception {
public void testDoNotResetUserModuleDependencies() {
VirtualFile m1 = createModulePom("m1",
"<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -1553,7 +1553,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1", "my-module", "m2");
}
public void testRemoveUnnecessaryMavenizedModuleDepsOnRepomport() throws Exception {
public void testRemoveUnnecessaryMavenizedModuleDepsOnRepomport() {
VirtualFile m1 = createModulePom("m1",
"<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -1581,7 +1581,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleModuleDeps("m1");
}
public void testDoNotResetCustomRootEntries() throws Exception {
public void testDoNotResetCustomRootEntries() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1621,7 +1621,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
Arrays.asList("jar://" + getRepositoryPath() + "/junit/junit/4.0/junit-4.0-javadoc.jar!/", "file://foo.javadoc", "jar://" + getRepositoryPath() + "/junit/junit/4.0/junit-4.0-javadoc.jar!/bbb"));
}
public void testDifferentSystemDependenciesWithSameId() throws Exception {
public void testDifferentSystemDependenciesWithSameId() {
createModulePom("m1", "<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
"<version>1</version>" +
@@ -1664,7 +1664,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDep("m2", "Maven: xxx:yyy:1", "jar://" + getRoot() + "/m2/foo.jar!/");
}
public void testUpdateRootEntriesWithActualPath() throws Exception {
public void testUpdateRootEntriesWithActualPath() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1697,7 +1697,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"jar://" + getRepositoryPath() + "/junit/junit/4.0/junit-4.0-javadoc.jar!/");
}
public void testUpdateRootEntriesWithActualPathForDependenciesWithClassifiers() throws Exception {
public void testUpdateRootEntriesWithActualPathForDependenciesWithClassifiers() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1730,7 +1730,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"jar://" + getRepositoryPath() + "/org/testng/testng/5.8/testng-5.8-javadoc.jar!/");
}
public void testDoNotPopulateSameRootEntriesOnEveryImport() throws Exception {
public void testDoNotPopulateSameRootEntriesOnEveryImport() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1759,7 +1759,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
Arrays.asList("jar://" + getRepositoryPath() + "/junit/junit/4.0/junit-4.0-javadoc.jar!/"));
}
public void testDoNotPopulateSameRootEntriesOnEveryImportForSystemLibraries() throws Exception {
public void testDoNotPopulateSameRootEntriesOnEveryImportForSystemLibraries() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1790,7 +1790,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
Collections.emptyList());
}
public void testRemovingPreviousSystemPathForForSystemLibraries() throws Exception {
public void testRemovingPreviousSystemPathForForSystemLibraries() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1833,7 +1833,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
Collections.emptyList());
}
public void testRemovingUnusedLibraries() throws Exception {
public void testRemovingUnusedLibraries() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1918,7 +1918,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"Maven: group:lib3:1");
}
public void testDoNoRemoveUnusedLibraryIfItWasChanged() throws Exception {
public void testDoNoRemoveUnusedLibraryIfItWasChanged() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1957,7 +1957,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"Maven: group:lib2:1");
}
public void testDoNoRemoveUserProjectLibraries() throws Exception {
public void testDoNoRemoveUserProjectLibraries() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -1976,7 +1976,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("project", "lib");
}
public void testDoNoRemoveUnusedUserProjectLibraries() throws Exception {
public void testDoNoRemoveUnusedUserProjectLibraries() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -1993,7 +1993,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertProjectLibraries("lib");
}
public void testRemovingUnusedLibrariesIfProjectRemoved() throws Exception {
public void testRemovingUnusedLibrariesIfProjectRemoved() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -2047,7 +2047,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertProjectLibraries("Maven: group:lib1:1");
}
public void testRemovingUnusedLibraryWithClassifier() throws Exception {
public void testRemovingUnusedLibraryWithClassifier() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -2111,7 +2111,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
});
}
public void testEjbDependenciesInJarProject() throws Exception {
public void testEjbDependenciesInJarProject() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -2135,7 +2135,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("project", "Maven: foo:foo:ejb:1", "Maven: foo:bar:ejb-client:client:1");
}
public void testDoNotFailOnAbsentAppLibrary() throws Exception {
public void testDoNotFailOnAbsentAppLibrary() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -2288,7 +2288,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("m", "Maven: asm:asm-attrs:2.2.1", "Maven: asm:asm:2.2.1");
}
public void testDependencyToIgnoredProject() throws Exception {
public void testDependencyToIgnoredProject() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -2335,7 +2335,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
"jar://" + getRepositoryPath() + "/test/m2/2/m2-2-javadoc.jar!/");
}
public void testSaveJdkPosition() throws Exception {
public void testSaveJdkPosition() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -2398,7 +2398,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase {
assert orderEntries[3] instanceof ModuleSourceOrderEntry;
}
public void testSaveJdkPositionSystemDependency() throws Exception {
public void testSaveJdkPositionSystemDependency() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
"<version>1</version>" +
@@ -39,7 +39,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
// );
//}
public void testSimpleProjectStructure() throws Exception {
public void testSimpleProjectStructure() {
createStdProjectFolders();
importProject("<groupId>test</groupId>" +
@@ -55,7 +55,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertTestResources("project", "src/test/resources");
}
public void testInvalidProjectHasContentRoot() throws Exception {
public void testInvalidProjectHasContentRoot() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1");
@@ -64,7 +64,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertContentRoots("project", getProjectPath());
}
public void testDoNotResetFoldersAfterResolveIfProjectIsInvalid() throws Exception {
public void testDoNotResetFoldersAfterResolveIfProjectIsInvalid() {
createStdProjectFolders();
importProject("<groupId>test</groupId>" +
@@ -88,7 +88,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertTestResources("project", "src/test/resources");
}
public void testDoesNotResetUserFolders() throws Exception {
public void testDoesNotResetUserFolders() {
final VirtualFile dir1 = createProjectSubDir("userSourceFolder");
final VirtualFile dir2 = createProjectSubDir("userExcludedFolder");
@@ -120,7 +120,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertExcludes("project", "target", "userExcludedFolder");
}
public void testClearParentAndSubFoldersOfNewlyImportedFolders() throws Exception {
public void testClearParentAndSubFoldersOfNewlyImportedFolders() {
createProjectSubDirs("src/main/java", "src/main/resources");
importProject("<groupId>test</groupId>" +
@@ -148,7 +148,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertResources("project", "src/main/resources");
}
public void testSourceFoldersOnReimport() throws Exception {
public void testSourceFoldersOnReimport() {
createProjectSubDirs("src1", "src2");
importProject("<groupId>test</groupId>" +
@@ -184,7 +184,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertSources("project", "src2", "src1");
}
public void testCustomSourceFolders() throws Exception {
public void testCustomSourceFolders() {
createStdProjectFolders();
createProjectSubDirs("src", "test", "res1", "res2", "testRes1", "testRes2");
@@ -214,7 +214,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertTestResources("project", "testRes1", "testRes2");
}
public void testDoNotAddCustomSourceFoldersOutsideOfContentRoot() throws Exception {
public void testDoNotAddCustomSourceFoldersOutsideOfContentRoot() {
createStdProjectFolders();
createProjectSubDirs("m",
"src",
@@ -255,7 +255,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
//getProjectPath() + "/testRes");
}
public void testPluginSources() throws Exception {
public void testPluginSources() {
createStdProjectFolders();
createProjectSubDirs("src1", "src2");
@@ -294,7 +294,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertResources("project", "src/main/resources");
}
public void testPluginSourceDuringGenerateResourcesPhase() throws Exception {
public void testPluginSourceDuringGenerateResourcesPhase() {
createStdProjectFolders();
createProjectSubDirs("extraResources");
@@ -332,7 +332,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertResources("project", "src/main/resources");
}
public void testPluginTestSourcesDuringGenerateTestResourcesPhase() throws Exception {
public void testPluginTestSourcesDuringGenerateTestResourcesPhase() {
createStdProjectFolders();
createProjectSubDirs("extraTestResources");
@@ -372,7 +372,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertTestResources("project", "src/test/resources");
}
public void testPluginSourcesWithRelativePath() throws Exception {
public void testPluginSourcesWithRelativePath() {
createStdProjectFolders();
createProjectSubDirs("relativePath");
@@ -410,7 +410,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertResources("project", "src/main/resources");
}
public void testPluginSourcesWithVariables() throws Exception {
public void testPluginSourcesWithVariables() {
createStdProjectFolders();
createProjectSubDirs("target/src");
@@ -448,7 +448,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertResources("project", "src/main/resources");
}
public void testPluginSourcesWithIntermoduleDependency() throws Exception {
public void testPluginSourcesWithIntermoduleDependency() {
createProjectSubDirs("m1/src/main/java",
"m1/src/main/resources",
"m1/src/foo");
@@ -713,7 +713,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertTestResources("project", "src/test/resources");
}
public void testDoesNotAddAlreadyRegisteredSourcesUnderGeneratedDir() throws Exception {
public void testDoesNotAddAlreadyRegisteredSourcesUnderGeneratedDir() {
createStdProjectFolders();
createProjectSubDirs("target/generated-sources/main/src",
"target/generated-test-sources/test/src");
@@ -785,7 +785,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertTestResources("project", "src/test/resources");
}
public void testExcludingOutputDirectories() throws Exception {
public void testExcludingOutputDirectories() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -797,7 +797,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
getProjectPath() + "/target/test-classes");
}
public void testExcludingOutputDirectoriesIfProjectOutputIsUsed() throws Exception {
public void testExcludingOutputDirectoriesIfProjectOutputIsUsed() {
getMavenImporterSettings().setUseMavenOutput(false);
importProject("<groupId>test</groupId>" +
@@ -813,7 +813,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertProjectOutput("project");
}
public void testExcludingCustomOutputDirectories() throws Exception {
public void testExcludingCustomOutputDirectories() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -835,7 +835,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
getProjectPath() + "/testCustom");
}
public void testExcludingCustomOutputUnderTargetUsingStandardVariable() throws Exception {
public void testExcludingCustomOutputUnderTargetUsingStandardVariable() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -853,7 +853,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
getProjectPath() + "/target/testCustom");
}
public void testDoNotExcludeExcludeOutputDirectoryWhenItPointstoRoot() throws Exception {
public void testDoNotExcludeExcludeOutputDirectoryWhenItPointstoRoot() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -872,7 +872,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
getProjectPath());
}
public void testOutputDirsOutsideOfContentRoot() throws Exception {
public void testOutputDirsOutsideOfContentRoot() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -928,7 +928,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertTestResources("project", "src/test/resources");
}
public void testDoesNotExcludeSourcesUnderTargetDir() throws Exception {
public void testDoesNotExcludeSourcesUnderTargetDir() {
createStdProjectFolders();
createProjectSubDirs("target/src",
"target/test",
@@ -948,7 +948,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertExcludes("project", "target");
}
public void testDoesNotExcludeSourcesUnderTargetDirWithProperties() throws Exception {
public void testDoesNotExcludeSourcesUnderTargetDirWithProperties() {
createProjectSubDirs("target/src", "target/xxx");
importProject("<groupId>test</groupId>" +
@@ -965,7 +965,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertExcludes("project", "target");
}
public void testDoesNotExcludeFoldersWithSourcesUnderTargetDir() throws Exception {
public void testDoesNotExcludeFoldersWithSourcesUnderTargetDir() {
createStdProjectFolders();
createProjectSubDirs("target/src/main",
"target/foo");
@@ -1082,7 +1082,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
testAssertions.run();
}
public void testUnexcludeNewSources() throws Exception {
public void testUnexcludeNewSources() {
createProjectSubDirs("target/foo");
createProjectSubDirs("target/src");
createProjectSubDirs("target/test/subFolder");
@@ -1108,7 +1108,7 @@ public class FoldersImportingTest extends MavenImportingTestCase {
assertExcludes("project", "target");
}
public void testUnexcludeNewSourcesUnderCompilerOutputDir() throws Exception {
public void testUnexcludeNewSourcesUnderCompilerOutputDir() {
createProjectSubDirs("target/classes/src");
importProject("<groupId>test</groupId>" +
@@ -22,7 +22,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
setRepositoryPath(new File(myDir, "repo").getPath());
}
public void testConfiguringFacetWithoutLibrary() throws Exception {
public void testConfiguringFacetWithoutLibrary() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -41,7 +41,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
assertUnorderedElementsAreEqual(GroovyConfigUtils.getInstance().getSDKLibrariesByModule(getModule("project")));
}
public void testConfiguringFacetWithLibrary() throws Exception {
public void testConfiguringFacetWithLibrary() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -73,7 +73,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
Arrays.asList("jar://" + getRepositoryPath() + "/org/codehaus/groovy/groovy-all-minimal/1.5.6/groovy-all-minimal-1.5.6.jar!/"));
}
public void testAddingGroovySpecificSources() throws Exception {
public void testAddingGroovySpecificSources() {
createStdProjectFolders();
createProjectSubDirs("src/main/groovy",
"src/test/groovy");
@@ -103,7 +103,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
assertTestResources("project", "src/test/resources");
}
public void testAddingGroovySpecificSources2() throws Exception {
public void testAddingGroovySpecificSources2() {
createStdProjectFolders();
createProjectSubDirs("src/main/groovy",
"src/test/groovy");
@@ -133,7 +133,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
assertTestResources("project", "src/test/resources");
}
public void testGroovyEclipsePlugin() throws Exception {
public void testGroovyEclipsePlugin() {
createStdProjectFolders();
createProjectSubDirs("src/main/groovy",
"src/test/groovy");
@@ -196,7 +196,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
assertTestResources("project", "src/test/resources");
}
public void testAddingCustomGroovySpecificSources() throws Exception {
public void testAddingCustomGroovySpecificSources() {
createStdProjectFolders();
createProjectSubDirs("src/main/groovy",
"src/foo1",
@@ -266,7 +266,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
assertTestResources("project", "src/test/resources");
}
public void testAddingCustomGroovySpecificSourcesByRelativePath() throws Exception {
public void testAddingCustomGroovySpecificSourcesByRelativePath() {
createProjectSubDirs("src/foo",
"src/test-foo");
@@ -317,7 +317,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
assertTestSources("project", "src/test-foo");
}
public void testDoNotAddGroovySpecificGeneratedSources() throws Exception {
public void testDoNotAddGroovySpecificGeneratedSources() {
createStdProjectFolders();
createProjectSubDirs("target/generated-sources/xxx/yyy",
"target/generated-sources/groovy-stubs/main/foo",
@@ -358,7 +358,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
assertExcludes("project", "target");
}
public void testDoNotAddCustomGroovySpecificGeneratedSources() throws Exception {
public void testDoNotAddCustomGroovySpecificGeneratedSources() {
createStdProjectFolders();
createProjectSubDirs("target/generated-sources/xxx/yyy",
"target/generated-sources/foo/aaa",
@@ -409,7 +409,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
assertExcludes("project", "target");
}
public void testDoNotAddCustomGroovySpecificGeneratedSourcesByRelativePath() throws Exception {
public void testDoNotAddCustomGroovySpecificGeneratedSourcesByRelativePath() {
createProjectSubDirs("target/generated-sources/xxx/yyy",
"target/generated-sources/foo/aaa",
"target/generated-sources/bar/bbb");
@@ -456,7 +456,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
assertExcludes("project", "target");
}
public void testUpdatingGroovySpecificGeneratedSourcesOnFoldersUpdate() throws Exception {
public void testUpdatingGroovySpecificGeneratedSourcesOnFoldersUpdate() {
try {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
@@ -513,7 +513,7 @@ public class GroovyImporterTest extends MavenImportingTestCase {
}
}
public void testDoNotAddGroovySpecificGeneratedSourcesForGMaven_1_2() throws Exception {
public void testDoNotAddGroovySpecificGeneratedSourcesForGMaven_1_2() {
createStdProjectFolders();
createProjectSubDirs("target/generated-sources/xxx/yyy",
"target/generated-sources/groovy-stubs/main/foo",
@@ -28,7 +28,7 @@ public class IgnoresImportingTest extends MavenImportingTestCase {
initProjectsManager(false);
}
public void testDoNotImportIgnoredProjects() throws Exception {
public void testDoNotImportIgnoredProjects() {
VirtualFile p1 = createModulePom("project1",
"<groupId>test</groupId>" +
"<artifactId>project1</artifactId>" +
@@ -44,7 +44,7 @@ public class IgnoresImportingTest extends MavenImportingTestCase {
assertModules("project2");
}
public void testAddingAndRemovingModulesWhenIgnoresChange() throws Exception {
public void testAddingAndRemovingModulesWhenIgnoresChange() {
configConfirmationForYesAnswer();
VirtualFile p1 = createModulePom("project1",
@@ -72,7 +72,7 @@ public class IgnoresImportingTest extends MavenImportingTestCase {
assertModules("project1");
}
public void testDoNotAskTwiceToRemoveIgnoredModule() throws Exception {
public void testDoNotAskTwiceToRemoveIgnoredModule() {
AtomicInteger counter = configConfirmationForNoAnswer();
VirtualFile p1 = createModulePom("project1",
@@ -29,7 +29,7 @@ import java.util.Calendar;
import java.util.List;
public class InvalidProjectImportingTest extends MavenImportingTestCase {
public void testUnknownProblem() throws Exception {
public void testUnknownProblem() {
importProject("");
assertModules("project");
@@ -37,7 +37,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(root, "'pom.xml' has syntax errors");
}
public void testUnknownProblemWithEmptyFile() throws Exception {
public void testUnknownProblemWithEmptyFile() {
createProjectPom("");
new WriteAction() {
@Override
@@ -54,7 +54,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(root, "'pom.xml' has syntax errors");
}
public void testUndefinedPropertyInHeader() throws Exception {
public void testUndefinedPropertyInHeader() {
importProject("<groupId>test</groupId>" +
"<artifactId>${undefined}</artifactId>" +
"<version>1</version>");
@@ -64,7 +64,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(root, "'artifactId' with value '${undefined}' does not match a valid id pattern.");
}
public void testUnresolvedParent() throws Exception {
public void testUnresolvedParent() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -81,7 +81,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(root, "Parent 'test:parent:1' not found");
}
public void testUnresolvedParentForInvalidProject() throws Exception {
public void testUnresolvedParentForInvalidProject() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -104,7 +104,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
"Module 'foo' not found");
}
public void testMissingModules() throws Exception {
public void testMissingModules() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -121,7 +121,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
}
@Bombed(user = "Vladislav.Soroka", year=2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testInvalidProjectModel() throws Exception {
public void testInvalidProjectModel() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -141,7 +141,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(root, "Packaging 'jar' is invalid. Aggregator projects require 'pom' as packaging.");
}
public void testInvalidModuleModel() throws Exception {
public void testInvalidModuleModel() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -164,7 +164,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(getModules(root).get(0), "'pom.xml' has syntax errors");
}
public void testSeveratInvalidModulesAndWithSameName() throws Exception {
public void testSeveratInvalidModulesAndWithSameName() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -197,7 +197,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertModules("project", "foo", "bar (1)", "bar (2)", "bar (3) (org.test)");
}
public void testInvalidProjectWithModules() throws Exception {
public void testInvalidProjectWithModules() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1" + // invalid tag
@@ -215,7 +215,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertModules("project", "foo");
}
public void testNonPOMProjectWithModules() throws Exception {
public void testNonPOMProjectWithModules() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -233,7 +233,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertModules("project", "foo");
}
public void testInvalidRepositoryLayout() throws Exception {
public void testInvalidRepositoryLayout() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -252,7 +252,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(root, "Cannot find layout implementation corresponding to: 'nothing' for remote repository with id: 'test'.");
}
public void testDoNotFailIfRepositoryHasEmptyLayout() throws Exception {
public void testDoNotFailIfRepositoryHasEmptyLayout() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -276,7 +276,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(root);
}
public void testDoNotFailIfDistributionRepositoryHasEmptyValues() throws Exception {
public void testDoNotFailIfDistributionRepositoryHasEmptyValues() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -294,7 +294,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
}
@Bombed(user = "Vladislav.Soroka", year=2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testUnresolvedDependencies() throws Exception {
public void testUnresolvedDependencies() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -347,7 +347,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
}
@Bombed(user = "Vladislav.Soroka", year=2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testUnresolvedPomTypeDependency() throws Exception {
public void testUnresolvedPomTypeDependency() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -369,7 +369,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(root, "Unresolved dependency: 'xxx:yyy:pom:4.0'");
}
public void testDoesNotReportInterModuleDependenciesAsUnresolved() throws Exception {
public void testDoesNotReportInterModuleDependenciesAsUnresolved() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -404,7 +404,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(getModules(root).get(1));
}
public void testCircularDependencies() throws Exception {
public void testCircularDependencies() {
if (ignore()) return;
createProjectPom("<groupId>test</groupId>" +
@@ -464,7 +464,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
}
@Bombed(user = "Vladislav.Soroka", year=2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testUnresolvedExtensionsAfterImport() throws Exception {
public void testUnresolvedExtensionsAfterImport() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -484,7 +484,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
}
@Bombed(user = "Vladislav.Soroka", year=2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testUnresolvedExtensionsAfterResolve() throws Exception {
public void testUnresolvedExtensionsAfterResolve() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -504,7 +504,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(root, "Unresolved build extension: 'xxx:yyy:1'");
}
public void testDoesNotReportExtensionsThatWereNotTriedToBeResolved() throws Exception {
public void testDoesNotReportExtensionsThatWereNotTriedToBeResolved() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -527,7 +527,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(getRootProjects().get(0));
}
public void testDoesNotReportExtensionsThatDoNotHaveJarFiles() throws Exception {
public void testDoesNotReportExtensionsThatDoNotHaveJarFiles() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -551,7 +551,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
}
@Bombed(user = "Vladislav.Soroka", year=2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testUnresolvedBuildExtensionsInModules() throws Exception {
public void testUnresolvedBuildExtensionsInModules() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -610,7 +610,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
}
@Bombed(user = "Vladislav.Soroka", year=2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testUnresolvedPlugins() throws Exception {
public void testUnresolvedPlugins() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -652,7 +652,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
}
@Bombed(user = "Vladislav.Soroka", year=2020, month = Calendar.APRIL, day = 1, description = "temporary disabled")
public void testUnresolvedPluginsAsExtensions() throws Exception {
public void testUnresolvedPluginsAsExtensions() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -686,7 +686,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase {
assertProblems(root, "'settings.xml' has syntax errors");
}
public void testInvalidProfilesXml() throws Exception {
public void testInvalidProfilesXml() {
createProfilesXml("<prof<<");
importProject("<groupId>test</groupId>" +
@@ -25,7 +25,7 @@ import java.util.List;
*/
public class MavenJGitBuildNumberTest extends MavenDomTestCase {
public void testCompletion() throws Exception {
public void testCompletion() {
importProject("<groupId>test</groupId>\n" +
"<artifactId>project</artifactId>\n" +
"<version>1</version>\n" +
@@ -63,7 +63,7 @@ public class MavenJGitBuildNumberTest extends MavenDomTestCase {
assertContain(variants, "git.commitsCount");
}
public void testHighlighting() throws Exception {
public void testHighlighting() {
createModulePom("m", "<artifactId>m</artifactId>\n" +
"<version>1</version>\n" +
"<parent>\n" +
@@ -109,7 +109,7 @@ public class MavenJGitBuildNumberTest extends MavenDomTestCase {
checkHighlighting(pom, true, false, true);
}
public void testNoPluginHighlighting() throws Exception {
public void testNoPluginHighlighting() {
importProject("<groupId>test</groupId>\n" +
"<artifactId>project</artifactId>\n" +
"<version>1</version>\n" +
@@ -117,7 +117,7 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase {
StringUtil.convertLineSeparators(VfsUtil.loadText(myProjectPom)));
}
public void testAddingManagedProjectIfNoArrgerator() throws Exception {
public void testAddingManagedProjectIfNoArrgerator() {
if (!hasMavenInstallation()) return;
importProject("<groupId>test</groupId>" +
@@ -134,7 +134,7 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase {
assertEquals(2, myProjectsManager.getProjectsTreeForTests().getManagedFilesPaths().size());
}
public void testDoNotAddManagedProjectIfAddingAsModuleToAggregator() throws Exception {
public void testDoNotAddManagedProjectIfAddingAsModuleToAggregator() {
if (!hasMavenInstallation()) return;
importProject("<groupId>test</groupId>" +
@@ -52,7 +52,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase {
}
}
public void testRefreshingActionsOnImport() throws Exception {
public void testRefreshingActionsOnImport() {
assertTrue(getProjectActions().isEmpty());
VirtualFile p1 = createModulePom("p1", "<groupId>test</groupId>" +
@@ -67,7 +67,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase {
assertEmptyKeymap();
}
public void testRefreshingOnProjectRead() throws Exception {
public void testRefreshingOnProjectRead() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -92,7 +92,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase {
assertKeymapContains(myProjectPom, goal);
}
public void testRefreshingOnPluginResolve() throws Exception {
public void testRefreshingOnPluginResolve() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -120,7 +120,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase {
assertKeymapContains(myProjectPom, goal);
}
public void testActionWhenSeveralSimilarPlugins() throws Exception {
public void testActionWhenSeveralSimilarPlugins() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -150,7 +150,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase {
assertKeymapContains(myProjectPom, goal);
}
public void testRefreshingOnProjectAddition() throws Exception {
public void testRefreshingOnProjectAddition() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -176,7 +176,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase {
assertKeymapContains(m, goal);
}
public void testDeletingActionOnProjectRemoval() throws Exception {
public void testDeletingActionOnProjectRemoval() {
final VirtualFile p1 = createModulePom("p1", "<groupId>test</groupId>" +
"<artifactId>p1</artifactId>" +
"<version>1</version>");
@@ -208,7 +208,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase {
assertKeymapContains(p2, goal);
}
public void testRefreshingActionsOnChangingIgnoreFlag() throws Exception {
public void testRefreshingActionsOnChangingIgnoreFlag() {
VirtualFile p1 = createModulePom("p1", "<groupId>test</groupId>" +
"<artifactId>p1</artifactId>" +
"<version>1</version>");
@@ -62,7 +62,7 @@ public class MiscImportingTest extends MavenImportingTestCase {
});
}
public void testRestarting() throws Exception {
public void testRestarting() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -112,7 +112,7 @@ public class MiscImportingTest extends MavenImportingTestCase {
assertModules("project");
}
public void testImportingAllAvailableFilesIfNotInitialized() throws Exception {
public void testImportingAllAvailableFilesIfNotInitialized() {
createModule("m1");
createModule("m2");
createProjectSubDirs("m1/src/main/java",
@@ -140,7 +140,7 @@ public class MiscImportingTest extends MavenImportingTestCase {
assertSources("m2", "src/main/java");
}
public void testImportingFiresRootChangesOnlyOnce() throws Exception {
public void testImportingFiresRootChangesOnlyOnce() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -148,7 +148,7 @@ public class MiscImportingTest extends MavenImportingTestCase {
assertRootsChanged(1);
}
public void testResolvingFiresRootChangesOnlyOnce() throws Exception {
public void testResolvingFiresRootChangesOnlyOnce() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -156,7 +156,7 @@ public class MiscImportingTest extends MavenImportingTestCase {
assertRootsChanged(1);
}
public void testImportingWithLibrariesAndFacetsFiresRootChangesOnlyOnce() throws Exception {
public void testImportingWithLibrariesAndFacetsFiresRootChangesOnlyOnce() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -178,7 +178,7 @@ public class MiscImportingTest extends MavenImportingTestCase {
assertRootsChanged(1);
}
public void testFacetsDoNotFireRootsChanges() throws Exception {
public void testFacetsDoNotFireRootsChanges() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -187,7 +187,7 @@ public class MiscImportingTest extends MavenImportingTestCase {
assertRootsChanged(1);
}
public void testDoNotRecreateModulesBeforeResolution() throws Exception {
public void testDoNotRecreateModulesBeforeResolution() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -258,7 +258,7 @@ public class MiscImportingTest extends MavenImportingTestCase {
assertTrue(jarFile.exists());
}
public void testClearUnresolvedPluginsAfterPluginResolution() throws Exception {
public void testClearUnresolvedPluginsAfterPluginResolution() {
try {
File repo = new File(myDir, "repo");
setRepositoryPath(repo.getPath());
@@ -352,7 +352,7 @@ public class MiscImportingTest extends MavenImportingTestCase {
assertEquals("throw!", mavenProject.getProblems().get(0).getDescription());
}
public void testCheckingIfModuleIsNotDisposedBeforeCommitOnImport() throws Exception {
public void testCheckingIfModuleIsNotDisposedBeforeCommitOnImport() {
if (ignore()) return;
importProject("<groupId>test</groupId>" +
@@ -390,7 +390,7 @@ public class MiscImportingTest extends MavenImportingTestCase {
});
}
public void testUserPropertiesCanBeCustomizedByMavenImportersForMaven3() throws Exception {
public void testUserPropertiesCanBeCustomizedByMavenImportersForMaven3() {
NameSettingMavenImporter extension = new NameSettingMavenImporter("name-from-properties");
ExtensionPoint<MavenImporter> extensionPoint = Extensions.getRootArea().getExtensionPoint(MavenImporter.EXTENSION_POINT_NAME);
extensionPoint.registerExtension(extension);
@@ -410,7 +410,7 @@ public class MiscImportingTest extends MavenImportingTestCase {
assertEquals("name-from-properties", project.getName());
}
public void testUserPropertiesCanBeCustomizedByMavenImportersForMaven2() throws Exception {
public void testUserPropertiesCanBeCustomizedByMavenImportersForMaven2() {
NameSettingMavenImporter extension = new NameSettingMavenImporter("name-from-properties");
ExtensionPoint<MavenImporter> extensionPoint = Extensions.getRootArea().getExtensionPoint(MavenImporter.EXTENSION_POINT_NAME);
extensionPoint.registerExtension(extension);
@@ -73,7 +73,7 @@ public class ReimportingTest extends MavenImportingTestCase {
assertModuleGroupPath("project", "group");
}
public void testAddingNewModule() throws Exception {
public void testAddingNewModule() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -93,7 +93,7 @@ public class ReimportingTest extends MavenImportingTestCase {
assertModules("project", "m1", "m2", "m3");
}
public void testRemovingObsoleteModule() throws Exception {
public void testRemovingObsoleteModule() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -108,7 +108,7 @@ public class ReimportingTest extends MavenImportingTestCase {
assertModules("project", "m1");
}
public void testDoesNotRemoveObsoleteModuleIfUserSaysNo() throws Exception {
public void testDoesNotRemoveObsoleteModuleIfUserSaysNo() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -123,7 +123,7 @@ public class ReimportingTest extends MavenImportingTestCase {
assertModules("project", "m1", "m2");
}
public void testDoesNotAskUserTwiceToRemoveTheSameModule() throws Exception {
public void testDoesNotAskUserTwiceToRemoveTheSameModule() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -155,7 +155,7 @@ public class ReimportingTest extends MavenImportingTestCase {
assertModules("project", "m1", "m2", "userModule");
}
public void testRemovingAndCreatingModulesForAggregativeProjects() throws Exception {
public void testRemovingAndCreatingModulesForAggregativeProjects() {
createModulePom("m1", "<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
"<version>1</version>" +
@@ -175,7 +175,7 @@ public class ReimportingTest extends MavenImportingTestCase {
assertModules("project", "m1", "m2");
}
public void testDoNotCreateModulesForNewlyCreatedAggregativeProjectsIfNotNecessary() throws Exception {
public void testDoNotCreateModulesForNewlyCreatedAggregativeProjectsIfNotNecessary() {
getMavenImporterSettings().setCreateModulesForAggregators(false);
configConfirmationForYesAnswer();
@@ -198,7 +198,7 @@ public class ReimportingTest extends MavenImportingTestCase {
assertModules("m1", "m2");
}
public void testReimportingWithProfiles() throws Exception {
public void testReimportingWithProfiles() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -234,7 +234,7 @@ public class ReimportingTest extends MavenImportingTestCase {
assertModules("project", "m2");
}
public void testChangingDependencyTypeToTestJar() throws Exception {
public void testChangingDependencyTypeToTestJar() {
configConfirmationForYesAnswer();
VirtualFile m1 = createModulePom("m1", createPomXmlWithModuleDependency("jar"));
@@ -256,7 +256,7 @@ public class ReimportingTest extends MavenImportingTestCase {
}
public void testSettingTargetLevel() throws Exception {
public void testSettingTargetLevel() {
createModulePom("m1", "<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
"<version>1</version>");
@@ -319,7 +319,7 @@ public class ReimportingTest extends MavenImportingTestCase {
"</dependencies>";
}
public void testReimportingWhenModuleHaveRootOfTheParent() throws Exception {
public void testReimportingWhenModuleHaveRootOfTheParent() {
createProjectSubDir("m1/res");
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
@@ -348,7 +348,7 @@ public class ReimportingTest extends MavenImportingTestCase {
assertEquals(0, counter.get());
}
public void testParentVersionProperty() throws Exception {
public void testParentVersionProperty() {
String parentPomTemplate =
"<groupId>test</groupId>\n" +
"<artifactId>project</artifactId>\n" +
@@ -400,7 +400,7 @@ public class ReimportingTest extends MavenImportingTestCase {
assertEquals("1.7", compilerConfiguration.getBytecodeTargetLevel(getModule("m1")));
}
public void testParentVersionProperty2() throws Exception {
public void testParentVersionProperty2() {
createProjectPom("<groupId>test</groupId>\n" +
"<artifactId>project</artifactId>\n" +
"<version>1</version>\n" +
@@ -40,15 +40,15 @@ public class SnapshotDependenciesImportingTest extends MavenImportingTestCase {
remoteRepoDir.mkdirs();
}
public void testSnapshotVersionDependencyToModule() throws Exception {
public void testSnapshotVersionDependencyToModule() {
performTestWithDependencyVersion("1-SNAPSHOT");
}
public void testSnapshotRangeDependencyToModule() throws Exception {
public void testSnapshotRangeDependencyToModule() {
performTestWithDependencyVersion("SNAPSHOT");
}
private void performTestWithDependencyVersion(String version) throws Exception {
private void performTestWithDependencyVersion(String version) {
if (!hasMavenInstallation()) return;
createProjectPom("<groupId>test</groupId>" +
@@ -35,7 +35,7 @@ import java.util.Calendar;
import java.util.List;
public class StructureImportingTest extends MavenImportingTestCase {
public void testInheritProjectJdkForModules() throws Exception {
public void testInheritProjectJdkForModules() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -43,7 +43,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertTrue(ModuleRootManager.getInstance(getModule("project")).isSdkInherited());
}
public void testDoNotResetSomeSettingsAfterReimport() throws Exception {
public void testDoNotResetSomeSettingsAfterReimport() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -55,7 +55,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals(sdk, ModuleRootManager.getInstance(getModule("project")).getSdk());
}
public void testModulesWithSlashesRegularAndBack() throws Exception {
public void testModulesWithSlashesRegularAndBack() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -87,7 +87,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals("m2", modules.get(1).getMavenId().getArtifactId());
}
public void testModulesAreNamedAfterArtifactIds() throws Exception {
public void testModulesAreNamedAfterArtifactIds() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -112,7 +112,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModules("project", "m1", "m2");
}
public void testModulesWithSlashesAtTheEnds() throws Exception {
public void testModulesWithSlashesAtTheEnds() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -140,7 +140,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModules("project", "m1", "m2", "m3");
}
public void testModulesWithSameArtifactId() throws Exception {
public void testModulesWithSameArtifactId() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -163,7 +163,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModules("project", "m (1) (test.group1)", "m (2) (test.group2)");
}
public void testModulesWithSameArtifactIdAndGroup() throws Exception {
public void testModulesWithSameArtifactIdAndGroup() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -186,7 +186,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModules("project", "m (1)", "m (2)");
}
public void testModuleWithRelativePath() throws Exception {
public void testModuleWithRelativePath() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -204,7 +204,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModules("project", "m");
}
public void testModuleWithRelativeParent() throws Exception {
public void testModuleWithRelativeParent() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -224,7 +224,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModules("project");
}
public void testModulePathsAsProperties() throws Exception {
public void testModulePathsAsProperties() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -261,7 +261,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals("m2", modules.get(1).getMavenId().getArtifactId());
}
public void testRecursiveParent() throws Exception {
public void testRecursiveParent() {
importProject("<parent>" +
" <groupId>org.apache.maven.archetype.test</groupId>" +
" <artifactId>test-create-2</artifactId>" +
@@ -273,7 +273,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
"<packaging>pom</packaging>");
}
public void testParentWithoutARelativePath() throws Exception {
public void testParentWithoutARelativePath() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -309,7 +309,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals("m1", modules.get(0).getMavenId().getArtifactId());
}
public void testModuleWithPropertiesWithParentWithoutARelativePath() throws Exception {
public void testModuleWithPropertiesWithParentWithoutARelativePath() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -345,7 +345,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals("m1", modules.get(0).getMavenId().getArtifactId());
}
public void testParentInLocalRepository() throws Exception {
public void testParentInLocalRepository() {
if (!hasMavenInstallation()) return;
final VirtualFile parent = createModulePom("parent",
@@ -385,7 +385,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("m", "Maven: junit:junit:4.0");
}
public void testParentInRemoteRepository() throws Exception {
public void testParentInRemoteRepository() {
String pathToJUnit = "asm/asm-parent/3.0";
File parentDir = new File(getRepositoryPath(), pathToJUnit);
@@ -411,7 +411,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertTrue(new File(parentDir, "asm-parent-3.0.pom").exists());
}
public void testCreatingModuleGroups() throws Exception {
public void testCreatingModuleGroups() {
VirtualFile p1 = createModulePom("project1",
"<groupId>test</groupId>" +
"<artifactId>project1</artifactId>" +
@@ -463,7 +463,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModuleGroupPath("m3", "project2 and modules", "m2 and modules");
}
public void testDoesNotCreateUnnecessaryTopLevelModuleGroup() throws Exception {
public void testDoesNotCreateUnnecessaryTopLevelModuleGroup() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -497,7 +497,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModuleGroupPath("m2", "m1 and modules");
}
public void testModuleGroupsWhenNotCreatingModulesForAggregatorProjects() throws Exception {
public void testModuleGroupsWhenNotCreatingModulesForAggregatorProjects() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -530,7 +530,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModuleGroupPath("module2", "module1 and modules");
}
public void testReimportingProjectWhenCreatingModuleGroupsSettingChanged() throws Exception {
public void testReimportingProjectWhenCreatingModuleGroupsSettingChanged() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -564,7 +564,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModuleGroupPath("module2", "module1 and modules");
}
public void testModuleGroupsWhenProjectWithDuplicateNameEmerges() throws Exception {
public void testModuleGroupsWhenProjectWithDuplicateNameEmerges() {
VirtualFile p1 = createModulePom("project1",
"<groupId>test</groupId>" +
"<artifactId>project1</artifactId>" +
@@ -624,7 +624,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModuleGroupPath("module (1)", "project2 and modules");
}
public void testLanguageLevel() throws Exception {
public void testLanguageLevel() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -645,7 +645,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals(LanguageLevel.JDK_1_4, getLanguageLevelForModule());
}
public void testLanguageLevelFromDefaultCompileExecutionConfiguration() throws Exception {
public void testLanguageLevelFromDefaultCompileExecutionConfiguration() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -671,7 +671,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals(LanguageLevel.JDK_1_8, getLanguageLevelForModule());
}
public void testLanguageLevel6() throws Exception {
public void testLanguageLevel6() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -692,7 +692,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals(LanguageLevel.JDK_1_6, getLanguageLevelForModule());
}
public void testLanguageLevelWhenCompilerPluginIsNotSpecified() throws Exception {
public void testLanguageLevelWhenCompilerPluginIsNotSpecified() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -701,7 +701,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals(LanguageLevel.JDK_1_5, getLanguageLevelForModule());
}
public void testLanguageLevelWhenConfigurationIsNotSpecified() throws Exception {
public void testLanguageLevelWhenConfigurationIsNotSpecified() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -719,7 +719,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals(LanguageLevel.JDK_1_5, getLanguageLevelForModule());
}
public void testLanguageLevelWhenSourceLanguageLevelIsNotSpecified() throws Exception {
public void testLanguageLevelWhenSourceLanguageLevelIsNotSpecified() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -739,7 +739,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals(LanguageLevel.JDK_1_5, getLanguageLevelForModule());
}
public void testLanguageLevelFromPluginManagementSection() throws Exception {
public void testLanguageLevelFromPluginManagementSection() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -762,7 +762,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals(LanguageLevel.JDK_1_4, getLanguageLevelForModule());
}
public void testLanguageLevelFromParentPluginManagementSection() throws Exception {
public void testLanguageLevelFromParentPluginManagementSection() {
createModulePom("parent",
"<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
@@ -798,7 +798,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals(LanguageLevel.JDK_1_4, getLanguageLevelForModule());
}
public void testOverridingLanguageLevelFromPluginManagementSection() throws Exception {
public void testOverridingLanguageLevelFromPluginManagementSection() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -830,7 +830,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals(LanguageLevel.JDK_1_3, getLanguageLevelForModule());
}
public void testInheritingLanguageLevelFromPluginManagementSection() throws Exception {
public void testInheritingLanguageLevelFromPluginManagementSection() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -866,7 +866,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
return LanguageLevelModuleExtensionImpl.getInstance(getModule("project")).getLanguageLevel();
}
public void testSettingTargetLevel() throws Exception {
public void testSettingTargetLevel() {
JavacConfiguration.getOptions(myProject, JavacConfiguration.class).ADDITIONAL_OPTIONS_STRING = "-Xmm500m -Xms128m -target 1.5";
importProject("<groupId>test</groupId>" +
@@ -893,7 +893,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals("1.3", targetLevel);
}
public void testSettingTargetLevelFromDefaultCompileExecutionConfiguration() throws Exception {
public void testSettingTargetLevelFromDefaultCompileExecutionConfiguration() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -921,7 +921,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals("1.9", targetLevel);
}
public void testSettingTargetLevelFromParent() throws Exception {
public void testSettingTargetLevelFromParent() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -974,7 +974,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertEquals("1.5", CompilerConfiguration.getInstance(myProject).getBytecodeTargetLevel(getModule("m2")));
}
public void testProjectWithBuiltExtension() throws Exception {
public void testProjectWithBuiltExtension() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -991,7 +991,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModules("project");
}
public void testProjectWithInvalidBuildExtension() throws Exception {
public void testProjectWithInvalidBuildExtension() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1008,7 +1008,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModules("project"); // shouldn't throw any exception
}
public void testUsingPropertyInBuildExtensionsOfChildModule() throws Exception {
public void testUsingPropertyInBuildExtensionsOfChildModule() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1101,7 +1101,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("m2", "Maven: junit:junit:4.0");
}
public void testProjectWithProfilesXmlFile() throws Exception {
public void testProjectWithProfilesXmlFile() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1149,7 +1149,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
ignore(); // not supported by 2.2
}
public void testProjectWithProfilesXmlWithNewRootTagFile() throws Exception {
public void testProjectWithProfilesXmlWithNewRootTagFile() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1193,7 +1193,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("project", "Maven: junit:junit:3.8.1");
}
public void testProjectWithDefaultProfileInProfilesXmlFile() throws Exception {
public void testProjectWithDefaultProfileInProfilesXmlFile() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1222,7 +1222,7 @@ public class StructureImportingTest extends MavenImportingTestCase {
assertModuleLibDeps("project", "Maven: junit:junit:4.0");
}
public void testRefreshFSAfterImport() throws Exception {
public void testRefreshFSAfterImport() {
myProjectRoot.getChildren(); // make sure fs is cached
new File(myProjectRoot.getPath(), "foo").mkdirs();
@@ -35,7 +35,7 @@ public class WorkingWithOpenProjectTest extends MavenImportingTestCase {
"<version>1</version>");
}
public void testShouldNotFailOnNewEmptyPomCreation() throws Exception {
public void testShouldNotFailOnNewEmptyPomCreation() {
createModulePom("module", ""); // should not throw an exception
}
@@ -47,7 +47,7 @@ public class MavenProjectIndicesManagerTest extends MavenIndicesTestCase {
assertTrue(myIndicesFixture.getProjectIndicesManager().hasVersion("junit", "junit", "4.0"));
}
public void testAutomaticallyAddRemoteRepositoriesOnProjectUpdate() throws Exception {
public void testAutomaticallyAddRemoteRepositoriesOnProjectUpdate() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -59,7 +59,7 @@ public class MavenProjectIndicesManagerTest extends MavenIndicesTestCase {
assertEquals("http://repo1.maven.org/maven2", indices.get(1).getRepositoryPathOrUrl());
}
public void testUpdatingIndicesOnResolution() throws Exception {
public void testUpdatingIndicesOnResolution() {
removeFromLocalRepository("junit/junit/4.0");
myIndicesFixture.getProjectIndicesManager().scheduleUpdate(myIndicesFixture.getProjectIndicesManager().getIndices());
@@ -46,7 +46,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase {
super.tearDown();
}
public void testActivation() throws Exception {
public void testActivation() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -66,7 +66,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase {
assertEquals(1, getRootNodes().get(0).getModulesNode().getProjectNodesInTests().size());
}
public void testReconnectingModulesWhenModuleRead() throws Exception {
public void testReconnectingModulesWhenModuleRead() {
myProjectsManager.fireActivatedInTests();
createProjectPom("<groupId>test</groupId>" +
@@ -93,7 +93,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase {
assertEquals(m, getRootNodes().get(0).getModulesNode().getProjectNodesInTests().get(0).getVirtualFile());
}
public void testReconnectingModulesWhenParentRead() throws Exception {
public void testReconnectingModulesWhenParentRead() {
myProjectsManager.fireActivatedInTests();
VirtualFile m = createModulePom("m", "<groupId>test</groupId>" +
@@ -119,7 +119,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase {
assertEquals(m, getRootNodes().get(0).getModulesNode().getProjectNodesInTests().get(0).getVirtualFile());
}
public void testReconnectingModulesWhenProjectBecomesParent() throws Exception {
public void testReconnectingModulesWhenProjectBecomesParent() {
myProjectsManager.fireActivatedInTests();
createProjectPom("<groupId>test</groupId>" +
@@ -148,7 +148,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase {
assertEquals(m, getRootNodes().get(0).getModulesNode().getProjectNodesInTests().get(0).getVirtualFile());
}
public void testUpdatingWhenManagedFilesChange() throws Exception {
public void testUpdatingWhenManagedFilesChange() {
myProjectsManager.fireActivatedInTests();
createProjectPom("<groupId>test</groupId>" +
@@ -162,7 +162,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase {
assertEquals(0, getRootNodes().size());
}
public void testGroupModulesAndGroupNot() throws Exception {
public void testGroupModulesAndGroupNot() {
myProjectsManager.fireActivatedInTests();
myNavigator.setGroupModules(true);
@@ -200,7 +200,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase {
assertEquals(1, getRootNodes().get(0).getModulesNode().getProjectNodesInTests().get(0).getModulesNode().getProjectNodesInTests().size());
}
public void testIgnoringProjects() throws Exception {
public void testIgnoringProjects() {
myProjectsManager.fireActivatedInTests();
createProjectPom("<groupId>test</groupId>" +
@@ -227,7 +227,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase {
assertEquals(0, getRootNodes().get(0).getModulesNode().getChildren().length);
}
public void testIgnoringParentProjectWhenNeedNoReconnectModule() throws Exception {
public void testIgnoringParentProjectWhenNeedNoReconnectModule() {
myProjectsManager.fireActivatedInTests();
createProjectPom("<groupId>test</groupId>" +
@@ -260,7 +260,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase {
assertEquals(0, projectNode.getModulesNode().getProjectNodesInTests().size());
}
public void testReorderingProjectsWhenNameChanges() throws Exception {
public void testReorderingProjectsWhenNameChanges() {
myProjectsManager.fireActivatedInTests();
VirtualFile m1 = createModulePom("m1", "<groupId>test</groupId>" +
@@ -286,7 +286,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase {
assertEquals(m1, getRootNodes().get(1).getVirtualFile());
}
public void testReloadingState() throws Exception {
public void testReloadingState() {
myProjectsManager.fireActivatedInTests();
createProjectPom("<groupId>test</groupId>" +
@@ -312,7 +312,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase {
assertEquals(2, getRootNodes().size());
}
public void testNavigatableForProjectNode() throws Exception {
public void testNavigatableForProjectNode() {
myProjectsManager.fireActivatedInTests();
createProjectPom("<groupId>test</groupId>" +
@@ -38,7 +38,7 @@ import java.util.Collections;
import java.util.List;
public class MavenProjectReaderTest extends MavenTestCase {
public void testBasics() throws Exception {
public void testBasics() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -50,7 +50,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("1", p.getVersion());
}
public void testInvalidXml() throws Exception {
public void testInvalidXml() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -73,7 +73,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("1", p.getVersion());
}
public void testInvalidXmlCharData() throws Exception {
public void testInvalidXmlCharData() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -89,7 +89,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("a0x0a", p.getName());
}
public void testInvalidParentXml() throws Exception {
public void testInvalidParentXml() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -105,7 +105,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertProblems(readProject(module, new NullProjectLocator()), "Parent 'test:parent:1' has problems");
}
public void testProjectWithAbsentParentXmlIsValid() throws Exception {
public void testProjectWithAbsentParentXmlIsValid() {
createProjectPom("<parent>" +
" <groupId>test</groupId>" +
" <artifactId>parent</artifactId>" +
@@ -114,7 +114,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertProblems(readProject(myProjectPom, new NullProjectLocator()));
}
public void testProjectWithSelfParentIsInvalid() throws Exception {
public void testProjectWithSelfParentIsInvalid() {
createProjectPom("<parent>" +
" <groupId>test</groupId>" +
" <artifactId>project</artifactId>" +
@@ -126,7 +126,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertProblems(readProject(myProjectPom, new NullProjectLocator()), "Self-inheritance found");
}
public void testInvalidProfilesXml() throws Exception {
public void testInvalidProfilesXml() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -146,7 +146,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertProblems(readProject(myProjectPom, new NullProjectLocator()), "'settings.xml' has syntax errors");
}
public void testInvalidXmlWithNotClosedTag() throws Exception {
public void testInvalidXmlWithNotClosedTag() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1" +
@@ -162,7 +162,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("foo", p.getName());
}
public void testInvalidXmlWithWrongClosingTag() throws Exception {
public void testInvalidXmlWithWrongClosingTag() {
if (ignore()) return;
createProjectPom("<groupId>test</groupId>" +
@@ -180,7 +180,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("foo", p.getName());
}
public void testEmpty() throws Exception {
public void testEmpty() {
createProjectPom("");
MavenModel p = readProject(myProjectPom);
@@ -190,14 +190,14 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("Unknown", p.getMavenId().getVersion());
}
public void testSpaces() throws Exception {
public void testSpaces() {
createProjectPom("<name>foo bar</name>");
MavenModel p = readProject(myProjectPom);
assertEquals("foo bar", p.getName());
}
public void testNewLines() throws Exception {
public void testNewLines() {
createProjectPom("<groupId>\n" +
" group\n" +
"</groupId>\n" +
@@ -212,7 +212,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals(new MavenId("group", "artifact", "1"), p.getMavenId());
}
public void testCommentsWithNewLinesInTags() throws Exception {
public void testCommentsWithNewLinesInTags() {
createProjectPom("<groupId>test<!--a-->\n" +
"</groupId>" +
"<artifactId>\n" +
@@ -232,7 +232,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertNull(p.getName());
}
public void testTextInContainerTag() throws Exception {
public void testTextInContainerTag() {
createProjectPom("foo <name>name</name> bar");
MavenModel p = readProject(myProjectPom);
@@ -276,7 +276,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
PlatformTestUtil.assertPathsEqual(pathFromBasedir("target/test-classes"), p.getBuild().getTestOutputDirectory());
}
public void testDefaultsForParent() throws Exception {
public void testDefaultsForParent() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -290,7 +290,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertParent(p, "Unknown", "Unknown", "Unknown");
}
public void testTakingCoordinatesFromParent() throws Exception {
public void testTakingCoordinatesFromParent() {
createProjectPom("<parent>" +
" <groupId>test</groupId>" +
" <artifactId>project</artifactId>" +
@@ -378,7 +378,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
PlatformTestUtil.assertPathsEqual(pathFromBasedir("myTestClasses"), p.getBuild().getTestOutputDirectory());
}
public void testOutputPathsAreBasedOnTargetPath() throws Exception {
public void testOutputPathsAreBasedOnTargetPath() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -393,7 +393,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
PlatformTestUtil.assertPathsEqual(pathFromBasedir("my-target/test-classes"), p.getBuild().getTestOutputDirectory());
}
public void testDoesNotIncludeResourcesWithoutDirectory() throws Exception {
public void testDoesNotIncludeResourcesWithoutDirectory() {
createProjectPom("<build>" +
" <resources>" +
" <resource>" +
@@ -413,7 +413,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals(0, p.getBuild().getTestResources().size());
}
public void testPathsWithProperties() throws Exception {
public void testPathsWithProperties() {
createProjectPom("<properties>" +
" <foo>subDir</foo>" +
" <emptyProperty />" +
@@ -459,7 +459,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
PlatformTestUtil.assertPathsEqual(pathFromBasedir("subDir/myTestClasses"), p.getBuild().getTestOutputDirectory());
}
public void testExpandingProperties() throws Exception {
public void testExpandingProperties() {
createProjectPom("<properties>" +
" <prop1>value1</prop1>" +
" <prop2>value2</prop2>" +
@@ -473,7 +473,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("value2", p.getPackaging());
}
public void testExpandingPropertiesRecursively() throws Exception {
public void testExpandingPropertiesRecursively() {
createProjectPom("<properties>" +
" <prop1>value1</prop1>" +
" <prop2>${prop1}2</prop2>" +
@@ -487,7 +487,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("value12", p.getPackaging());
}
public void testHandlingRecursiveProperties() throws Exception {
public void testHandlingRecursiveProperties() {
createProjectPom("<properties>" +
" <prop1>${prop2}</prop1>" +
" <prop2>${prop1}</prop2>" +
@@ -536,7 +536,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertProblems(readResult);
}
public void testDoNotGoIntoRecursionWhenTryingToResolveParentInDefaultPath() throws Exception {
public void testDoNotGoIntoRecursionWhenTryingToResolveParentInDefaultPath() {
VirtualFile child = createModulePom("child",
"<groupId>test</groupId>" +
"<artifactId>child</artifactId>" +
@@ -563,7 +563,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertProblems(readResult);
}
public void testExpandingSystemAndEnvProperties() throws Exception {
public void testExpandingSystemAndEnvProperties() {
createProjectPom("<name>${java.home}</name>" +
"<packaging>${env." + getEnvVar() + "}</packaging>");
@@ -572,7 +572,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals(System.getenv(getEnvVar()), p.getPackaging());
}
public void testExpandingPropertiesFromProfiles() throws Exception {
public void testExpandingPropertiesFromProfiles() {
createProjectPom("<name>${prop1}</name>" +
"<packaging>${prop2}</packaging>" +
@@ -599,7 +599,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("${prop2}", p.getPackaging());
}
public void testExpandingPropertiesFromManuallyActivatedProfiles() throws Exception {
public void testExpandingPropertiesFromManuallyActivatedProfiles() {
createProjectPom("<name>${prop1}</name>" +
"<packaging>${prop2}</packaging>" +
@@ -626,7 +626,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("value2", p.getPackaging());
}
public void testExpandingPropertiesFromParent() throws Exception {
public void testExpandingPropertiesFromParent() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -647,7 +647,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("value", p.getName());
}
public void testDoNotExpandPropertiesFromParentWithWrongCoordinates() throws Exception {
public void testDoNotExpandPropertiesFromParentWithWrongCoordinates() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -690,7 +690,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("value", p.getName());
}
public void testExpandingPropertiesFromIndirectParent() throws Exception {
public void testExpandingPropertiesFromIndirectParent() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -722,7 +722,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("value", p.getName());
}
public void testExpandingPropertiesFromParentInSpecifiedLocation() throws Exception {
public void testExpandingPropertiesFromParentInSpecifiedLocation() {
createModulePom("parent",
"<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
@@ -745,7 +745,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("value", p.getName());
}
public void testExpandingPropertiesFromParentInSpecifiedLocationWithoutFile() throws Exception {
public void testExpandingPropertiesFromParentInSpecifiedLocationWithoutFile() {
createModulePom("parent",
"<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
@@ -794,7 +794,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("value", p.getName());
}
public void testExpandingPropertiesFromParentInInvalidLocation() throws Exception {
public void testExpandingPropertiesFromParentInInvalidLocation() {
final VirtualFile parent = createModulePom("parent",
"<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
@@ -821,7 +821,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("value", p.getName());
}
public void testPropertiesFromParentInParentSection() throws Exception {
public void testPropertiesFromParentInParentSection() {
createProjectPom("<groupId>${groupProp}</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>${versionProp}</version>" +
@@ -843,7 +843,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("test:module:1", id.getGroupId() + ":" + id.getArtifactId() + ":" + id.getVersion());
}
public void testInheritingSettingsFromParentAndAlignCorrectly() throws Exception {
public void testInheritingSettingsFromParentAndAlignCorrectly() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -862,7 +862,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
PlatformTestUtil.assertPathsEqual(pathFromBasedir(module.getParent(), "custom"), p.getBuild().getDirectory());
}
public void testExpandingPropertiesAfterInheritingSettingsFromParent() throws Exception {
public void testExpandingPropertiesAfterInheritingSettingsFromParent() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -885,7 +885,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
PlatformTestUtil.assertPathsEqual(pathFromBasedir(module.getParent(), "subDir/custom"), p.getBuild().getDirectory());
}
public void testExpandingPropertiesAfterInheritingSettingsFromParentProfiles() throws Exception {
public void testExpandingPropertiesAfterInheritingSettingsFromParentProfiles() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -913,7 +913,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
PlatformTestUtil.assertPathsEqual(pathFromBasedir(module.getParent(), "subDir/custom"), p.getBuild().getDirectory());
}
public void testPropertiesFromProfilesXmlOldStyle() throws Exception {
public void testPropertiesFromProfilesXmlOldStyle() {
createProjectPom("<name>${prop}</name>");
createProfilesXmlOldStyle("<profile>" +
" <id>one</id>" +
@@ -929,7 +929,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("foo", mavenProject.getName());
}
public void testPropertiesFromProfilesXmlNewStyle() throws Exception {
public void testPropertiesFromProfilesXmlNewStyle() {
createProjectPom("<name>${prop}</name>");
createProfilesXml("<profile>" +
" <id>one</id>" +
@@ -963,7 +963,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("foo", mavenProject.getName());
}
public void testDoNoInheritParentFinalNameIfUnspecified() throws Exception {
public void testDoNoInheritParentFinalNameIfUnspecified() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>");
@@ -983,7 +983,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("module-2", p.getBuild().getFinalName());
}
public void testDoInheritingParentFinalNameIfSpecified() throws Exception {
public void testDoInheritingParentFinalNameIfSpecified() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -1008,7 +1008,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
}
public void testInheritingParentProfiles() throws Exception {
public void testInheritingParentProfiles() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -1145,7 +1145,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertEquals("settings.xml", p.getProfiles().get(0).getSource());
}
public void testModulesAreNotInheritedFromParentsProfiles() throws Exception {
public void testModulesAreNotInheritedFromParentsProfiles() {
VirtualFile p = createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1173,7 +1173,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertSize(0, readProject(m, "one").getModules());
}
public void testActivatingProfilesByDefault() throws Exception {
public void testActivatingProfilesByDefault() {
createProjectPom("<profiles>" +
" <profile>" +
" <id>one</id>" +
@@ -1192,7 +1192,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertActiveProfiles("one");
}
public void testActivatingProfilesAfterResolvingInheritance() throws Exception {
public void testActivatingProfilesAfterResolvingInheritance() {
createModulePom("parent",
"<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
@@ -1217,7 +1217,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertActiveProfiles("one");
}
public void testActivatingProfilesByOS() throws Exception {
public void testActivatingProfilesByOS() {
String os = SystemInfo.isWindows ? "windows" : SystemInfo.isMac ? "mac" : "unix";
createProjectPom("<profiles>" +
@@ -1238,7 +1238,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertActiveProfiles("one");
}
public void testActivatingProfilesByJdk() throws Exception {
public void testActivatingProfilesByJdk() {
createProjectPom("<profiles>" +
" <profile>" +
" <id>one</id>" +
@@ -1257,7 +1257,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertActiveProfiles("one");
}
public void testActivatingProfilesByStrictJdkVersion() throws Exception {
public void testActivatingProfilesByStrictJdkVersion() {
createProjectPom("<profiles>" +
" <profile>" +
" <id>one</id>" +
@@ -1270,7 +1270,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertActiveProfiles();
}
public void testActivatingProfilesByProperty() throws Exception {
public void testActivatingProfilesByProperty() {
createProjectPom("<profiles>" +
" <profile>" +
" <id>one</id>" +
@@ -1295,7 +1295,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertActiveProfiles("one");
}
public void testActivatingProfilesByEnvProperty() throws Exception {
public void testActivatingProfilesByEnvProperty() {
String value = System.getenv(getEnvVar());
createProjectPom("<profiles>" +
@@ -1347,7 +1347,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertActiveProfiles("one");
}
public void testActivateDefaultProfileEventIfThereAreExplicitOnesButAbsent() throws Exception {
public void testActivateDefaultProfileEventIfThereAreExplicitOnesButAbsent() {
createProjectPom("<profiles>" +
" <profile>" +
" <id>default</id>" +
@@ -1363,7 +1363,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertActiveProfiles(Arrays.asList("foofoofoo"), "default");
}
public void testDoNotActivateDefaultProfileIfThereAreActivatedImplicit() throws Exception {
public void testDoNotActivateDefaultProfileIfThereAreActivatedImplicit() {
createProjectPom("<profiles>" +
" <profile>" +
" <id>default</id>" +
@@ -1382,7 +1382,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertActiveProfiles("implicit");
}
public void testActivatingImplicitProfilesEventWhenThereAreExplicitOnes() throws Exception {
public void testActivatingImplicitProfilesEventWhenThereAreExplicitOnes() {
createProjectPom("<profiles>" +
" <profile>" +
" <id>explicit</id>" +
@@ -1416,7 +1416,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertActiveProfiles(Arrays.asList("explicit"), "explicit", "settings");
}
public void testAlwaysActivatingActiveProfilesInProfilesXml() throws Exception {
public void testAlwaysActivatingActiveProfilesInProfilesXml() {
createFullProfilesXml("<?xml version=\"1.0\"?>" +
"<profilesXml>" +
" <activeProfiles>" +
@@ -1499,7 +1499,7 @@ public class MavenProjectReaderTest extends MavenTestCase {
assertActiveProfiles("default", "settings");
}
public void testActivateDefaultProfilesWhenThereAreActiveProfilesInProfilesXml() throws Exception {
public void testActivateDefaultProfilesWhenThereAreActiveProfilesInProfilesXml() {
createFullProfilesXml("<?xml version=\"1.0\"?>" +
"<profilesXml>" +
" <profiles>" +
@@ -30,10 +30,9 @@ import org.jetbrains.jps.model.java.JavaSourceRootProperties;
import org.jetbrains.jps.model.java.JavaSourceRootType;
import java.io.File;
import java.io.IOException;
public class MavenFoldersImporterTest extends MavenImportingTestCase {
public void testUpdatingExternallyCreatedFolders() throws Exception {
public void testUpdatingExternallyCreatedFolders() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -50,7 +49,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase {
assertNull(myProjectRoot.findChild("target"));
}
public void testIgnoreTargetFolder() throws Exception {
public void testIgnoreTargetFolder() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -67,7 +66,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase {
}
}
public void testUpdatingFoldersForAllTheProjects() throws Exception {
public void testUpdatingFoldersForAllTheProjects() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -107,7 +106,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase {
assertGeneratedSources("m2", "target/generated-sources/yyy");
}
public void testDoesNotTouchSourceFolders() throws Exception {
public void testDoesNotTouchSourceFolders() {
createStdProjectFolders();
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
@@ -126,7 +125,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase {
assertTestResources("project", "src/test/resources");
}
public void testDoesNotExcludeRegisteredSources() throws Exception {
public void testDoesNotExcludeRegisteredSources() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -150,7 +149,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase {
assertExcludes("project", "target");
}
public void testDoesNothingWithNonMavenModules() throws Exception {
public void testDoesNothingWithNonMavenModules() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -159,7 +158,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase {
updateProjectFolders(); // shouldn't throw exceptions
}
public void testDoNotUpdateOutputFoldersWhenUpdatingExcludedFolders() throws Exception {
public void testDoNotUpdateOutputFoldersWhenUpdatingExcludedFolders() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -182,7 +181,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase {
assertTrue(compiler.getCompilerOutputUrlForTests(), compiler.getCompilerOutputUrlForTests().endsWith("my-test-classes"));
}
public void testDoNotCommitIfFoldersWasNotChanged() throws Exception {
public void testDoNotCommitIfFoldersWasNotChanged() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -200,7 +199,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase {
assertEquals(0, count[0]);
}
public void testCommitOnlyOnceForAllModules() throws Exception {
public void testCommitOnlyOnceForAllModules() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -240,7 +239,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase {
assertEquals(1, count[0]);
}
public void testMarkSourcesAsGeneratedOnReImport() throws IOException {
public void testMarkSourcesAsGeneratedOnReImport() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>");
@@ -32,7 +32,7 @@ import java.util.List;
import java.util.Map;
public class MavenProjectTest extends MavenImportingTestCase {
public void testCollectingPlugins() throws Exception {
public void testCollectingPlugins() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -59,7 +59,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertDeclaredPlugins(p("group1", "id1"), p("group1", "id2"), p("group2", "id1"));
}
public void testPluginsContainDefaultPlugins() throws Exception {
public void testPluginsContainDefaultPlugins() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -78,7 +78,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertContain(p(getMavenProject().getPlugins()), p("group1", "id1"), p("org.apache.maven.plugins", "maven-compiler-plugin"));
}
public void testDefaultPluginsAsDeclared() throws Exception {
public void testDefaultPluginsAsDeclared() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -96,7 +96,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertDeclaredPlugins(p("org.apache.maven.plugins", "maven-compiler-plugin"));
}
public void testDoNotDuplicatePluginsFromBuildAndManagement() throws Exception {
public void testDoNotDuplicatePluginsFromBuildAndManagement() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -122,7 +122,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertDeclaredPlugins(p("org.apache.maven.plugins", "maven-compiler-plugin"));
}
public void testCollectingPluginsFromProfilesAlso() throws Exception {
public void testCollectingPluginsFromProfilesAlso() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -176,7 +176,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertDeclaredPlugins(p("group", "id"), p("group1", "id1"), p("group2", "id2"));
}
public void testFindingPlugin() throws Exception {
public void testFindingPlugin() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -226,7 +226,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertNull(findPlugin("group2", "id2"));
}
public void testFindingDefaultPlugin() throws Exception {
public void testFindingDefaultPlugin() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -247,7 +247,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertNotNull(findPlugin("org.apache.maven.plugins", "maven-compiler-plugin"));
}
public void testFindingMavenGroupPluginWithDefaultPluginGroup() throws Exception {
public void testFindingMavenGroupPluginWithDefaultPluginGroup() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -266,7 +266,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertNull(findPlugin("some.other.group.id", "some.plugin.id"));
}
public void testPluginConfiguration() throws Exception {
public void testPluginConfiguration() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -304,7 +304,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertNull(findPluginConfig("group", "id3", "one.two.three"));
}
public void testPluginGoalConfiguration() throws Exception {
public void testPluginGoalConfiguration() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -348,7 +348,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertEquals("b", findPluginGoalConfig("group", "id", "testCompile", "one.two"));
}
public void testPluginConfigurationHasResolvedVariables() throws Exception {
public void testPluginConfigurationHasResolvedVariables() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -373,7 +373,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertEquals("somePath", findPluginConfig("group", "id", "one"));
}
public void testPluginConfigurationWithStandardVariable() throws Exception {
public void testPluginConfigurationWithStandardVariable() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -395,7 +395,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
FileUtil.toSystemIndependentName(findPluginConfig("group", "id", "one")));
}
public void testPluginConfigurationWithColons() throws Exception {
public void testPluginConfigurationWithColons() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -415,7 +415,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertNull(findPluginConfig("group", "id", "two:three"));
}
public void testMergingPluginConfigurationFromBuildAndProfiles() throws Exception {
public void testMergingPluginConfigurationFromBuildAndProfiles() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -470,7 +470,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertEquals("true", plugin.getConfigurationElement().getChildText("debug"));
}
public void testCompilerPluginConfigurationFromProperties() throws Exception {
public void testCompilerPluginConfigurationFromProperties() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -487,7 +487,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertEquals("1.7", getMavenProject().getTargetLevel());
}
public void testCompilerPluginConfigurationFromPropertiesOverride() throws Exception {
public void testCompilerPluginConfigurationFromPropertiesOverride() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -517,7 +517,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertEquals("1.4", getMavenProject().getTargetLevel());
}
public void testMergingPluginConfigurationFromBuildProfilesAndPluginsManagement() throws Exception {
public void testMergingPluginConfigurationFromBuildProfilesAndPluginsManagement() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -569,7 +569,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertEquals("true", plugin.getConfigurationElement().getChildText("debug"));
}
public void testDoesNotCollectProfilesWithoutId() throws Exception {
public void testDoesNotCollectProfilesWithoutId() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -585,7 +585,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertOrderedElementsAreEqual(getMavenProject().getProfilesIds(), "one");
}
public void testCollectingRepositories() throws Exception {
public void testCollectingRepositories() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -608,7 +608,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertEquals("central", result.get(2).getId());
}
public void testOverridingCentralRepository() throws Exception {
public void testOverridingCentralRepository() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -626,7 +626,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertEquals("http://my.repository.com", result.get(0).getUrl());
}
public void testCollectingRepositoriesFromParent() throws Exception {
public void testCollectingRepositoriesFromParent() {
VirtualFile m1 = createModulePom("p1",
"<groupId>test</groupId>" +
"<artifactId>p1</artifactId>" +
@@ -670,7 +670,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertEquals("central", result.get(2).getId());
}
public void testMavenModelMap() throws Exception {
public void testMavenModelMap() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -695,7 +695,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
assertEquals(null, map.get("build.pluginMap"));
}
public void testDependenciesTree() throws Exception {
public void testDependenciesTree() {
VirtualFile m1 = createModulePom("p1",
"<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -739,7 +739,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
"test:m2:jar:1->(junit:junit:jar:4.0->(),test:lib2:jar:1->()),test:lib1:jar:1->()");
}
public void testDependenciesTreeWithTypesAndClassifiers() throws Exception {
public void testDependenciesTreeWithTypesAndClassifiers() {
VirtualFile m1 = createModulePom("p1",
"<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -775,7 +775,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
"test:m2:pom:test:1->(test:lib:jar:1->())");
}
public void testDependenciesTreeWithConflict() throws Exception {
public void testDependenciesTreeWithConflict() {
VirtualFile m1 = createModulePom("p1",
"<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -818,7 +818,7 @@ public class MavenProjectTest extends MavenImportingTestCase {
nodes.get(1).getArtifact());
}
public void testDependencyTreeDuplicates() throws Exception {
public void testDependencyTreeDuplicates() {
VirtualFile m1 = createModulePom("p1",
"<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -34,7 +34,6 @@ import org.jetbrains.idea.maven.project.*;
import org.jetbrains.idea.maven.server.NativeMavenProjectHolder;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -47,7 +46,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
getMavenImporterSettings().setImportAutomatically(true);
}
public void testShouldReturnNullForUnprocessedFiles() throws Exception {
public void testShouldReturnNullForUnprocessedFiles() {
// this pom file doesn't belong to any of the modules, this is won't be processed
// by MavenProjectProjectsManager and won't occur in its projects list.
createProjectPom("<groupId>test</groupId>" +
@@ -58,7 +57,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertNull(myProjectsManager.findProject(myProjectPom));
}
public void testUpdatingProjectsWhenAbsentManagedProjectFileAppears() throws Exception {
public void testUpdatingProjectsWhenAbsentManagedProjectFileAppears() {
importProject("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -92,7 +91,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertEquals(1, myProjectsTree.getRootProjects().size());
}
public void testUpdatingProjectsWhenRenaming() throws Exception {
public void testUpdatingProjectsWhenRenaming() {
VirtualFile p1 = createModulePom("project1",
"<groupId>test</groupId>" +
"<artifactId>project1</artifactId>" +
@@ -123,7 +122,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertEquals(2, myProjectsTree.getRootProjects().size());
}
public void testUpdatingProjectsWhenMoving() throws Exception {
public void testUpdatingProjectsWhenMoving() {
VirtualFile p1 = createModulePom("project1",
"<groupId>test</groupId>" +
"<artifactId>project1</artifactId>" +
@@ -157,7 +156,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertEquals(2, myProjectsTree.getRootProjects().size());
}
public void testUpdatingProjectsWhenMovingModuleFile() throws Exception {
public void testUpdatingProjectsWhenMovingModuleFile() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -201,7 +200,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertEquals(0, myProjectsTree.getModules(myProjectsTree.getRootProjects().get(0)).size());
}
public void testUpdatingProjectsWhenAbsentModuleFileAppears() throws Exception {
public void testUpdatingProjectsWhenAbsentModuleFileAppears() {
importProject("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -227,7 +226,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertEquals(m, children.get(0).getFile());
}
public void testAddingAndRemovingManagedFiles() throws Exception {
public void testAddingAndRemovingManagedFiles() {
VirtualFile m1 = createModulePom("m1",
"<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -251,15 +250,15 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertUnorderedElementsAreEqual(myProjectsTree.getRootProjectsFiles(), m1);
}
public void testAddingAndRemovingManagedFilesAddsAndRemovesModules() throws Exception {
public void testAddingAndRemovingManagedFilesAddsAndRemovesModules() {
doTestAddingAndRemovingAddsAndRemovesModules(true);
}
public void testAddingAndRemovingManagedFilesAddsAndRemovesModulesInNonAutoImportMode() throws Exception {
public void testAddingAndRemovingManagedFilesAddsAndRemovesModulesInNonAutoImportMode() {
doTestAddingAndRemovingAddsAndRemovesModules(false);
}
private void doTestAddingAndRemovingAddsAndRemovesModules(boolean autoImport) throws IOException {
private void doTestAddingAndRemovingAddsAndRemovesModules(boolean autoImport) {
VirtualFile m1 = createModulePom("m1",
"<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -291,7 +290,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertModules("m1");
}
public void testAddingManagedFileAndChangingAggregation() throws Exception {
public void testAddingManagedFileAndChangingAggregation() {
importProject("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -542,7 +541,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
"jar://" + FileUtil.toSystemIndependentName(repo.getPath()) + "/junit/junit/4.0/junit-4.0.jar!/");
}
public void testUpdatingProjectsOnProfilesXmlChange() throws Exception {
public void testUpdatingProjectsOnProfilesXmlChange() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -626,7 +625,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertUnorderedPathsAreEqual(childNode.getSources(), Arrays.asList(FileUtil.toSystemDependentName(getProjectPath() + "/m/value2")));
}
public void testHandlingDirectoryWithPomFileDeletion() throws Exception {
public void testHandlingDirectoryWithPomFileDeletion() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -660,7 +659,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertEquals(1, MavenProjectsManager.getInstance(myProject).getProjects().size());
}
public void testSavingAndLoadingState() throws Exception {
public void testSavingAndLoadingState() {
MavenProjectsManagerState state = myProjectsManager.getState();
assertTrue(state.originalFiles.isEmpty());
assertTrue(MavenWorkspaceSettingsComponent.getInstance(myProject).getSettings().enabledProfiles.isEmpty());
@@ -718,7 +717,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
p1, p3);
}
public void testSchedulingReimportWhenPomFileIsDeleted() throws Exception {
public void testSchedulingReimportWhenPomFileIsDeleted() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -750,7 +749,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertModules("project");
}
public void testSchedulingResolveOfDependentProjectWhenDependencyChanges() throws Exception {
public void testSchedulingResolveOfDependentProjectWhenDependencyChanges() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -801,7 +800,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertModuleLibDeps("m1", "Maven: junit:junit:4.0");
}
public void testSchedulingResolveOfDependentProjectWhenDependencyIsDeleted() throws Exception {
public void testSchedulingResolveOfDependentProjectWhenDependencyIsDeleted() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<packaging>pom</packaging>" +
@@ -862,7 +861,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertModuleLibDeps("m1", "Maven: test:m2:1");
}
public void testDoNotScheduleResolveOfInvalidProjectsDeleted() throws Exception {
public void testDoNotScheduleResolveOfInvalidProjectsDeleted() {
final boolean[] called = new boolean[1];
myProjectsManager.addProjectsTreeListener(new MavenProjectsTree.Listener() {
@Override
@@ -889,7 +888,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertFalse(called[0]); // on update
}
public void testUpdatingFoldersAfterFoldersResolving() throws Exception {
public void testUpdatingFoldersAfterFoldersResolving() {
createStdProjectFolders();
createProjectSubDirs("src1", "src2");
@@ -926,7 +925,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertResources("project", "src/main/resources");
}
public void testForceReimport() throws Exception {
public void testForceReimport() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -966,7 +965,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertModuleLibDeps("project", "Maven: junit:junit:4.0");
}
public void testScheduleReimportWhenPluginConfigurationChangesInTagName() throws Exception {
public void testScheduleReimportWhenPluginConfigurationChangesInTagName() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1008,7 +1007,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertTrue(myProjectsManager.hasScheduledImportsInTests());
}
public void testScheduleReimportWhenPluginConfigurationChangesInValue() throws Exception {
public void testScheduleReimportWhenPluginConfigurationChangesInValue() {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1050,7 +1049,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertTrue(myProjectsManager.hasScheduledImportsInTests());
}
public void testIgnoringProjectsForDeletedModules() throws Exception {
public void testIgnoringProjectsForDeletedModules() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1077,7 +1076,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase {
assertTrue(myProjectsManager.isIgnored(myProjectsManager.findProject(m)));
}
public void testDoNotRemoveMavenProjectsOnReparse() throws Exception {
public void testDoNotRemoveMavenProjectsOnReparse() {
// this pom file doesn't belong to any of the modules, this is won't be processed
// by MavenProjectProjectsManager and won't occur in its projects list.
importProject("<groupId>test</groupId>" +
@@ -37,7 +37,7 @@ import java.util.Collections;
import java.util.List;
public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
public void testTwoRootProjects() throws Exception {
public void testTwoRootProjects() {
VirtualFile m1 = createModulePom("m1",
"<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -56,7 +56,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(m2, roots.get(1).getFile());
}
public void testModulesWithWhiteSpaces() throws Exception {
public void testModulesWithWhiteSpaces() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -85,7 +85,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(m, myTree.getModules(roots.get(0)).get(0).getFile());
}
public void testDoNotImportChildAsRootProject() throws Exception {
public void testDoNotImportChildAsRootProject() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -110,7 +110,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(m, myTree.getModules(roots.get(0)).get(0).getFile());
}
public void testDoNotImportSameRootProjectTwice() throws Exception {
public void testDoNotImportSameRootProjectTwice() {
MyLoggingListener listener = new MyLoggingListener();
myTree.addListener(listener);
@@ -134,7 +134,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("updated: m1 m2 deleted: <none> ", listener.log);
}
public void testRereadingChildIfParentWasReadAfterIt() throws Exception {
public void testRereadingChildIfParentWasReadAfterIt() {
MyLoggingListener listener = new MyLoggingListener();
myTree.addListener(listener);
@@ -170,7 +170,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("updated: m2 m1 deleted: <none> ", listener.log);
}
public void testSameProjectAsModuleOfSeveralProjects() throws Exception {
public void testSameProjectAsModuleOfSeveralProjects() {
VirtualFile p1 = createModulePom("project1",
"<groupId>test</groupId>" +
"<artifactId>project1</artifactId>" +
@@ -209,7 +209,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(0, myTree.getModules(roots.get(1)).size());
}
public void testSameProjectAsModuleOfSeveralProjectsInHierarchy() throws Exception {
public void testSameProjectAsModuleOfSeveralProjectsInHierarchy() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -246,7 +246,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(m2, myTree.getModules(myTree.getModules(roots.get(0)).get(0)).get(0).getFile());
}
public void testRemovingChildProjectFromRootProjects() throws Exception {
public void testRemovingChildProjectFromRootProjects() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -274,7 +274,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(m, myTree.getModules(roots.get(0)).get(0).getFile());
}
public void testSendingNotificationsWhenAggregationChanged() throws Exception {
public void testSendingNotificationsWhenAggregationChanged() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -321,7 +321,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("updated: project m2 deleted: <none> ", listener.log);
}
public void testUpdatingWholeModel() throws Exception {
public void testUpdatingWholeModel() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -373,7 +373,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("m1", childNode1.getMavenId().getArtifactId());
}
public void testForceUpdatingWholeModel() throws Exception {
public void testForceUpdatingWholeModel() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -403,7 +403,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("updated: project m deleted: <none> ", l.log);
}
public void testForceUpdatingSingleProject() throws Exception {
public void testForceUpdatingSingleProject() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -434,7 +434,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
l.log = "";
}
public void testUpdatingModelWithNewProfiles() throws Exception {
public void testUpdatingModelWithNewProfiles() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -484,7 +484,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(m2, myTree.getModules(roots.get(0)).get(0).getFile());
}
public void testUpdatingParticularProject() throws Exception {
public void testUpdatingParticularProject() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -511,7 +511,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("m1", n.getMavenId().getArtifactId());
}
public void testUpdatingInheritance() throws Exception {
public void testUpdatingInheritance() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -547,7 +547,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("child2", myTree.findProject(child).getMavenId().getArtifactId());
}
public void testUpdatingInheritanceHierarhically() throws Exception {
public void testUpdatingInheritanceHierarhically() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -595,7 +595,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("subChild2", myTree.findProject(subChild).getMavenId().getArtifactId());
}
public void testSendingNotificationAfterProjectIsAddedInToHierarchy() throws Exception {
public void testSendingNotificationAfterProjectIsAddedInToHierarchy() {
MyLoggingListener listener = new MyLoggingListener();
myTree.addListener(listener);
@@ -698,7 +698,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("updated: parent child deleted: <none> resolved: parent plugins: parent folders: parent ", listener.log);
}
public void testAddingInheritanceParent() throws Exception {
public void testAddingInheritanceParent() {
VirtualFile child = createModulePom("child",
"<groupId>test</groupId>" +
"<artifactId>${childName}</artifactId>" +
@@ -727,7 +727,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("child", myTree.findProject(child).getMavenId().getArtifactId());
}
public void testAddingInheritanceChild() throws Exception {
public void testAddingInheritanceChild() {
VirtualFile parent = createModulePom("parent",
"<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
@@ -755,7 +755,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("child", myTree.findProject(child).getMavenId().getArtifactId());
}
public void testAddingInheritanceChildOnParentUpdate() throws Exception {
public void testAddingInheritanceChildOnParentUpdate() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -786,7 +786,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("child", myTree.findProject(child).getMavenId().getArtifactId());
}
public void testDoNotReAddInheritanceChildOnParentModulesRemoval() throws Exception {
public void testDoNotReAddInheritanceChildOnParentModulesRemoval() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -825,7 +825,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(0, myTree.getModules(roots.get(0)).size());
}
public void testChangingInheritance() throws Exception {
public void testChangingInheritance() {
VirtualFile parent1 = createModulePom("parent1",
"<groupId>test</groupId>" +
"<artifactId>parent1</artifactId>" +
@@ -873,7 +873,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("child2", myTree.findProject(child).getMavenId().getArtifactId());
}
public void testChangingInheritanceParentId() throws Exception {
public void testChangingInheritanceParentId() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -909,7 +909,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("${childName}", myTree.findProject(child).getMavenId().getArtifactId());
}
public void testHandlingSelfInheritance() throws Exception {
public void testHandlingSelfInheritance() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -929,7 +929,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
updateAll(myProjectPom); // shouldn't hang
}
public void testHandlingRecursiveInheritance() throws Exception {
public void testHandlingRecursiveInheritance() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -967,7 +967,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
updateAll(myProjectPom, child); // shouldn't hang
}
public void testDeletingInheritanceParent() throws Exception {
public void testDeletingInheritanceParent() {
VirtualFile parent = createModulePom("parent",
"<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
@@ -997,7 +997,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("${childName}", myTree.findProject(child).getMavenId().getArtifactId());
}
public void testDeletingInheritanceChild() throws Exception {
public void testDeletingInheritanceChild() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -1035,7 +1035,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("${subChildName}", myTree.findProject(subChild).getMavenId().getArtifactId());
}
public void testRecursiveInheritanceAndAggregation() throws Exception {
public void testRecursiveInheritanceAndAggregation() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -1060,7 +1060,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
updateAll(child); // should not recurse
}
public void testUpdatingAddsModules() throws Exception {
public void testUpdatingAddsModules() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1096,7 +1096,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(m, myTree.getModules(roots.get(0)).get(0).getFile());
}
public void testUpdatingUpdatesModulesIfProjectIsChanged() throws Exception {
public void testUpdatingUpdatesModulesIfProjectIsChanged() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1134,7 +1134,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("m2", myTree.findProject(m).getMavenId().getArtifactId());
}
public void testUpdatingDoesNotUpdateModulesIfProjectIsNotChanged() throws Exception {
public void testUpdatingDoesNotUpdateModulesIfProjectIsNotChanged() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1163,7 +1163,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("m", myTree.findProject(m).getMavenId().getArtifactId());
}
public void testAddingProjectAsModuleToExistingOne() throws Exception {
public void testAddingProjectAsModuleToExistingOne() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1192,7 +1192,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(m, myTree.getModules(roots.get(0)).get(0).getFile());
}
public void testAddingProjectAsAggregatorForExistingOne() throws Exception {
public void testAddingProjectAsAggregatorForExistingOne() {
VirtualFile m = createModulePom("m",
"<groupId>test</groupId>" +
"<artifactId>m</artifactId>" +
@@ -1223,7 +1223,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(m, myTree.getModules(roots.get(0)).get(0).getFile());
}
public void testAddingProjectWithModules() throws Exception {
public void testAddingProjectWithModules() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1260,7 +1260,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(m2, myTree.getModules(roots.get(1)).get(0).getFile());
}
public void testUpdatingAddsModulesFromRootProjects() throws Exception {
public void testUpdatingAddsModulesFromRootProjects() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1298,7 +1298,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(m, myTree.getModules(roots.get(0)).get(0).getFile());
}
public void testMovingModuleToRootsWhenAggregationChanged() throws Exception {
public void testMovingModuleToRootsWhenAggregationChanged() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1331,7 +1331,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertTrue(myTree.getModules(roots.get(1)).isEmpty());
}
public void testDeletingProject() throws Exception {
public void testDeletingProject() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1359,7 +1359,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(0, myTree.getModules(roots.get(0)).size());
}
public void testDeletingProjectWithModules() throws Exception {
public void testDeletingProjectWithModules() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1399,7 +1399,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(0, myTree.getModules(roots.get(0)).size());
}
public void testSendingNotificationsWhenProjectDeleted() throws Exception {
public void testSendingNotificationsWhenProjectDeleted() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1434,7 +1434,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("updated: <none> deleted: m2 m1 ", listener.log);
}
public void testReconnectModuleOfDeletedProjectIfModuleIsManaged() throws Exception {
public void testReconnectModuleOfDeletedProjectIfModuleIsManaged() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1481,7 +1481,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("updated: m2 deleted: m1 ", listener.log);
}
public void testAddingProjectsOnUpdateAllWhenManagedFilesChanged() throws Exception {
public void testAddingProjectsOnUpdateAllWhenManagedFilesChanged() {
VirtualFile m1 = createModulePom("m1",
"<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -1501,7 +1501,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(3, myTree.getRootProjects().size());
}
public void testDeletingProjectsOnUpdateAllWhenManagedFilesChanged() throws Exception {
public void testDeletingProjectsOnUpdateAllWhenManagedFilesChanged() {
VirtualFile m1 = createModulePom("m1",
"<groupId>test</groupId>" +
"<artifactId>m1</artifactId>" +
@@ -1521,7 +1521,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals(2, myTree.getRootProjects().size());
}
public void testSendingNotificationsWhenAddingOrDeletingManagedFiles() throws Exception {
public void testSendingNotificationsWhenAddingOrDeletingManagedFiles() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
"<version>1</version>" +
@@ -1556,7 +1556,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertEquals("updated: <none> deleted: m1 m2 parent ", l.log);
}
public void testUpdatingModelWhenActiveProfilesChange() throws Exception {
public void testUpdatingModelWhenActiveProfilesChange() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1616,7 +1616,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertUnorderedPathsAreEqual(childNode.getSources(), Arrays.asList(FileUtil.toSystemDependentName(getProjectPath() + "/m/value2")));
}
public void testUpdatingModelWhenProfilesXmlChange() throws Exception {
public void testUpdatingModelWhenProfilesXmlChange() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1658,7 +1658,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertUnorderedPathsAreEqual(project.getSources(), Arrays.asList(FileUtil.toSystemDependentName(getProjectPath() + "/value2")));
}
public void testUpdatingModelWhenParentProfilesXmlChange() throws Exception {
public void testUpdatingModelWhenParentProfilesXmlChange() {
VirtualFile parent = createModulePom("parent",
"<groupId>test</groupId>" +
"<artifactId>parent</artifactId>" +
@@ -1713,7 +1713,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertUnorderedPathsAreEqual(childProject.getSources(), Arrays.asList(FileUtil.toSystemDependentName(getProjectPath() + "/m/value2")));
}
public void testUpdatingModelWhenParentProfilesXmlChangeAndItIsAModuleAlso() throws Exception {
public void testUpdatingModelWhenParentProfilesXmlChangeAndItIsAModuleAlso() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -1767,7 +1767,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertUnorderedPathsAreEqual(childNode.getSources(), Arrays.asList(FileUtil.toSystemDependentName(getProjectPath() + "/m/value2")));
}
public void testDoNotUpdateModelWhenAggregatorProfilesXmlChange() throws Exception {
public void testDoNotUpdateModelWhenAggregatorProfilesXmlChange() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -2061,7 +2061,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
"settings");
}
public void testDeletingAndRestoringActiveProfilesWhenAvailableProfilesChange() throws Exception {
public void testDeletingAndRestoringActiveProfilesWhenAvailableProfilesChange() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -2107,7 +2107,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertUnorderedElementsAreEqual(myTree.getExplicitProfiles().getEnabledProfiles(), "one", "two");
}
public void testDeletingAndRestoringActiveProfilesWhenProjectDeletes() throws Exception {
public void testDeletingAndRestoringActiveProfilesWhenProjectDeletes() {
createProjectPom("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
@@ -2162,7 +2162,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase {
assertUnorderedElementsAreEqual(myTree.getExplicitProfiles().getEnabledProfiles(), "one", "two");
}
public void testFindRootWithMultiLevelAggregator() throws Exception {
public void testFindRootWithMultiLevelAggregator() {
VirtualFile p1 = createModulePom("project1", "<groupId>test</groupId>" +
"<artifactId>project1</artifactId>" +
"<version>1</version>" +
@@ -30,31 +30,31 @@ import org.jetbrains.annotations.Nullable;
public class XsltResolveTest extends TestBase {
public void testResolveSingleVariableGlobal() throws Throwable {
public void testResolveSingleVariableGlobal() {
doVariableResolveTest(true);
}
public void testResolveForwardVariable() throws Throwable {
public void testResolveForwardVariable() {
doVariableResolveTest(true);
}
public void testResolveSingleVariable() throws Throwable {
public void testResolveSingleVariable() {
doVariableResolveTest(false);
}
public void testResolveShadowedVariable() throws Throwable {
public void testResolveShadowedVariable() {
doVariableResolveTest(false);
}
public void testResolveIncludedFunction() throws Throwable {
public void testResolveIncludedFunction() {
doFunctionResolveTest("included-2.xsl");
}
public void testResolveFunction() throws Throwable {
public void testResolveFunction() {
doFunctionResolveTest();
}
public void testResolveSameName() throws Throwable {
public void testResolveSameName() {
final XsltVariable variable = doVariableResolveTest(false);
final XsltTemplate template = XsltCodeInsightUtil.getTemplate(variable, false);