diff --git a/platform/platform-tests/testSrc/com/intellij/codeInsight/actions/ReformatOnlyVcsChangedTextTest.java b/platform/platform-tests/testSrc/com/intellij/codeInsight/actions/ReformatOnlyVcsChangedTextTest.java index 283f7f2f5243..2e18ba53eea3 100644 --- a/platform/platform-tests/testSrc/com/intellij/codeInsight/actions/ReformatOnlyVcsChangedTextTest.java +++ b/platform/platform-tests/testSrc/com/intellij/codeInsight/actions/ReformatOnlyVcsChangedTextTest.java @@ -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); diff --git a/platform/platform-tests/testSrc/com/intellij/codeInsight/editorActions/AbstractMoveElementLeftRightTest.java b/platform/platform-tests/testSrc/com/intellij/codeInsight/editorActions/AbstractMoveElementLeftRightTest.java index 447d9a9b996e..621488f33f8c 100644 --- a/platform/platform-tests/testSrc/com/intellij/codeInsight/editorActions/AbstractMoveElementLeftRightTest.java +++ b/platform/platform-tests/testSrc/com/intellij/codeInsight/editorActions/AbstractMoveElementLeftRightTest.java @@ -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); diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/ForwardBackwardParagraphActionTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/ForwardBackwardParagraphActionTest.java index 0a06bc83db74..a4ab2dc41601 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/ForwardBackwardParagraphActionTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/ForwardBackwardParagraphActionTest.java @@ -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("abc\n" + "\n" + "def\n" + @@ -16,7 +16,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest { "\n"); } - public void testForwardFromEmptyLine() throws Exception { + public void testForwardFromEmptyLine() { doTestForward("\n" + "\n" + "def\n" + @@ -28,7 +28,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest { "\n"); } - public void testForwardWhenNoMoreBlankLines() throws Exception { + public void testForwardWhenNoMoreBlankLines() { doTestForward("abc\n" + "def", @@ -36,7 +36,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest { "def"); } - public void testForwardWhenTargetLineContainsSpaces() throws Exception { + public void testForwardWhenTargetLineContainsSpaces() { doTestForward("abc\n" + " \n", @@ -44,7 +44,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest { " \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" + "def", @@ -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" + "abc", @@ -96,7 +96,7 @@ public class ForwardBackwardParagraphActionTest extends AbstractEditorTest { "abc"); } - public void testBackwardAtLineStartWhenPreviousLineContainsSpaces() throws Exception { + public void testBackwardAtLineStartWhenPreviousLineContainsSpaces() { doTestBackward("\n" + "ttt\n" + " \n" + diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorRtlTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorRtlTest.java index d0afdf20256c..88a0aa7a932a 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorRtlTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorRtlTest.java @@ -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("R"); } - 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("R"); } - 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("LR"); } - 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("LL RR RR LL"); @@ -429,7 +427,7 @@ public class EditorRtlTest extends AbstractRtlTest { checkResult("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("RR"); } - 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("R R"); } - 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("RLR"); right(); checkResult("RLR"); } - public void testTabInsideRtlText() throws Exception { + public void testTabInsideRtlText() { prepareText("R\tRR"); right(); checkResult("R\tRR"); diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/softwrap/mapping/SoftWrapApplianceOnDocumentModificationTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/softwrap/mapping/SoftWrapApplianceOnDocumentModificationTest.java index 3011b318c030..fc3579d85a0b 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/softwrap/mapping/SoftWrapApplianceOnDocumentModificationTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/softwrap/mapping/SoftWrapApplianceOnDocumentModificationTest.java @@ -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"; @@ -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); } diff --git a/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java b/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java index f340fbfa5cc7..cb52fc98d72c 100644 --- a/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java +++ b/platform/xdebugger-impl/testSrc/com/intellij/xdebugger/XDebuggerTestUtil.java @@ -131,12 +131,11 @@ public class XDebuggerTestUtil { return container.waitFor(TIMEOUT_MS); } - public static List collectFrames(@NotNull XDebugSession session) throws InterruptedException { + public static List collectFrames(@NotNull XDebugSession session) { return collectFrames(null, session); } - public static List collectFrames(@Nullable XExecutionStack thread, @NotNull XDebugSession session) - throws InterruptedException { + public static List 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 vars, @Nullable String name, @Nullable String value) - throws InterruptedException { + public static void assertVariableValue(Collection 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 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 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); } diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/naming/BatchPackageNamingConventionInspectionTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/naming/BatchPackageNamingConventionInspectionTest.java index 828f3847d129..acc6d5f4d5ec 100644 --- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/naming/BatchPackageNamingConventionInspectionTest.java +++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/naming/BatchPackageNamingConventionInspectionTest.java @@ -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()); } } diff --git a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXRenameTest.java b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXRenameTest.java index 7faeff5d37b0..7c57d1432130 100644 --- a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXRenameTest.java +++ b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXRenameTest.java @@ -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); } diff --git a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFxCompletionTest.java b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFxCompletionTest.java index 49feeeacb424..d8413c875e6a 100644 --- a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFxCompletionTest.java +++ b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFxCompletionTest.java @@ -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(); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenImportingTestCase.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenImportingTestCase.java index f11a15f09e53..8c8eb1aa6a9a 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenImportingTestCase.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenImportingTestCase.java @@ -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(); } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java index fef727a4ae3a..272eb9b2fa70 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java @@ -387,19 +387,19 @@ public abstract class MavenTestCase extends UsefulTestCase { ""; } - 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); } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/actions/MavenProjectModelModifierTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/actions/MavenProjectModelModifierTest.java index 2db82b2d5cb8..7c5c9fc20911 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/actions/MavenProjectModelModifierTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/actions/MavenProjectModelModifierTest.java @@ -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("test" + "project" + "1"); @@ -54,7 +53,7 @@ public class MavenProjectModelModifierTest extends MavenDomWithIndicesTestCase { assertModuleLibDep("project", "Maven: junit:junit:" + version); } - public void testAddExternalLibraryDependencyWithEqualMinAndMaxVersions() throws IOException { + public void testAddExternalLibraryDependencyWithEqualMinAndMaxVersions() { importProject("test" + "project" + "1"); @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1"); @@ -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", "test" + "m1" + @@ -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", "test" + "m1" + @@ -182,7 +181,7 @@ public class MavenProjectModelModifierTest extends MavenDomWithIndicesTestCase { assertModuleLibDep("m1", libName); } - public void testChangeLanguageLevel() throws IOException { + public void testChangeLanguageLevel() { importProject("test" + "project" + "1"); @@ -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("test" + "project" + "pom" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceCopyingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceCopyingTest.java index 971684b0eea3..b2db4b33c660 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceCopyingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceCopyingTest.java @@ -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("test" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceFilteringTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceFilteringTest.java index 9694d1d83f48..5d272c361996 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceFilteringTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceFilteringTest.java @@ -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() { diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencyCompletionAndResolutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencyCompletionAndResolutionTest.java index ab4518ba67ff..6d508a724a41 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencyCompletionAndResolutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencyCompletionAndResolutionTest.java @@ -45,7 +45,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi "1"); } - public void testGroupIdCompletion() throws Exception { + public void testGroupIdCompletion() { createProjectPom("test" + "project" + "1" + @@ -59,7 +59,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi assertCompletionVariantsInclude(myProjectPom, "junit", "jmock", "test"); } - public void testArtifactIdCompletion() throws Exception { + public void testArtifactIdCompletion() { createProjectPom("test" + "project" + "1" + @@ -74,7 +74,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi assertCompletionVariants(myProjectPom, "junit"); } - public void testDoNotCompleteArtifactIdOnUnknownGroup() throws Exception { + public void testDoNotCompleteArtifactIdOnUnknownGroup() { createProjectPom("test" + "project" + "1" + @@ -89,7 +89,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi assertCompletionVariants(myProjectPom); } - public void testVersionCompletion() throws Exception { + public void testVersionCompletion() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -136,7 +136,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi assertCompletionVariants(myProjectPom, "RELEASE", "LATEST"); } - public void testDoNotCompleteVersionIfNoGroupIdAndArtifactId() throws Exception { + public void testDoNotCompleteVersionIfNoGroupIdAndArtifactId() { createProjectPom("test" + "project" + "1" + @@ -150,7 +150,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi assertCompletionVariants(myProjectPom); // should not throw } - public void testAddingLocalProjectsIntoCompletion() throws Exception { + public void testAddingLocalProjectsIntoCompletion() { createProjectPom("project-group" + "project" + "1" + @@ -186,7 +186,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi assertCompletionVariants(m, "project", "m1", "m2"); } - public void testResolvingPropertiesForLocalProjectsInCompletion() throws Throwable { + public void testResolvingPropertiesForLocalProjectsInCompletion() { createProjectPom("test" + "project" + "1" + @@ -246,7 +246,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(m); } - public void testChangingExistingProjects() throws Exception { + public void testChangingExistingProjects() { createProjectPom("test" + "project" + "1" + @@ -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", "project-group" + "m1" + @@ -342,7 +342,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi assertCompletionVariants(myProjectPom); } - public void testRemovingExistingProjects() throws Exception { + public void testRemovingExistingProjects() { final VirtualFile m = createModulePom("m1", "project-group" + "m1" + @@ -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("test" + @@ -587,7 +587,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testHighlightInvalidSystemScopeDependencies() throws Throwable { + public void testHighlightInvalidSystemScopeDependencies() { createProjectPom("test" + "project" + "1" + @@ -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("test" + @@ -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("test" + @@ -693,7 +693,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testChooseFileIntentionForSystemDependency() throws Throwable { + public void testChooseFileIntentionForSystemDependency() { createProjectPom("test" + "project" + "1" + @@ -739,7 +739,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi assertEquals(findPsiFile(libFile), dep.getSystemPath().getValue()); } - public void testNoChooseFileIntentionForNonSystemDependency() throws Throwable { + public void testNoChooseFileIntentionForNonSystemDependency() { createProjectPom("test" + "project" + "1" + @@ -757,7 +757,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi assertNull(action); } - public void testTypeCompletion() throws Exception { + public void testTypeCompletion() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -788,7 +788,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(myProjectPom); } - public void testScopeCompletion() throws Exception { + public void testScopeCompletion() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -819,7 +819,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(myProjectPom); } - public void testPropertiesInScopes() throws Throwable { + public void testPropertiesInScopes() { createProjectPom("test" + "project" + "1" + @@ -840,7 +840,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(myProjectPom); } - public void testDoesNotHighlightCorrectValues() throws Throwable { + public void testDoesNotHighlightCorrectValues() { createProjectPom("test" + "project" + "1" + @@ -856,7 +856,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testHighlightingArtifactIdAndVersionIfGroupIsUnknown() throws Throwable { + public void testHighlightingArtifactIdAndVersionIfGroupIsUnknown() { createProjectPom("test" + "project" + "1" + @@ -872,7 +872,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testHighlightingArtifactAndVersionIfGroupIsEmpty() throws Throwable { + public void testHighlightingArtifactAndVersionIfGroupIsEmpty() { createProjectPom("test" + "project" + "1" + @@ -888,7 +888,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testHighlightingVersionAndArtifactIfArtifactTheyAreFromAnotherGroup() throws Throwable { + public void testHighlightingVersionAndArtifactIfArtifactTheyAreFromAnotherGroup() { createProjectPom("test" + "project" + "1" + @@ -904,7 +904,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testHighlightingVersionIfArtifactIsEmpty() throws Throwable { + public void testHighlightingVersionIfArtifactIsEmpty() { createProjectPom("test" + "project" + "1" + @@ -920,7 +920,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testHighlightingVersionIfArtifactIsUnknown() throws Throwable { + public void testHighlightingVersionIfArtifactIsUnknown() { createProjectPom("test" + "project" + "1" + @@ -936,7 +936,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testHighlightingVersionItIsFromAnotherGroup() throws Throwable { + public void testHighlightingVersionItIsFromAnotherGroup() { createProjectPom("test" + "project" + "1" + @@ -952,7 +952,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testHighlightingCoordinatesWithClosedTags() throws Throwable { + public void testHighlightingCoordinatesWithClosedTags() { if (ignore()) return; createProjectPom("test" + @@ -970,7 +970,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testHandlingProperties() throws Throwable { + public void testHandlingProperties() { createProjectPom("test" + "project" + "1" + @@ -999,7 +999,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testHandlingPropertiesWhenProjectIsNotYetLoaded() throws Throwable { + public void testHandlingPropertiesWhenProjectIsNotYetLoaded() { createProjectPom("test" + "project" + "1" + @@ -1021,7 +1021,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testDontHighlightProblemsInNonManagedPom1() throws Throwable { + public void testDontHighlightProblemsInNonManagedPom1() { createProjectPom("test" + "project" + "1" + @@ -1051,7 +1051,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(m, true, false, true); } - public void testDontHighlightProblemsInNonManagedPom2() throws Throwable { + public void testDontHighlightProblemsInNonManagedPom2() { createProjectPom("test" + "project" + "1" + @@ -1076,7 +1076,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(m, true, false, true); } - public void testUpdateIndicesIntention() throws Throwable { + public void testUpdateIndicesIntention() { createProjectPom("test" + "project" + "1" + @@ -1090,7 +1090,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi assertNotNull(getIntentionAtCaret("Update Maven Indices")); } - public void testExclusionCompletion() throws Exception { + public void testExclusionCompletion() { createProjectPom("test" + "project" + "1" + @@ -1111,7 +1111,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi assertCompletionVariants(myProjectPom, "jmock"); } - public void testDoNotHighlightUnknownExclusions() throws Throwable { + public void testDoNotHighlightUnknownExclusions() { createProjectPom("test" + "project" + "1" + @@ -1132,7 +1132,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testExclusionHighlightingAbsentGroupId() throws Throwable { + public void testExclusionHighlightingAbsentGroupId() { createProjectPom("test" + "project" + "1" + @@ -1152,7 +1152,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi checkHighlighting(); } - public void testExclusionHighlightingAbsentArtifactId() throws Throwable { + public void testExclusionHighlightingAbsentArtifactId() { createProjectPom("test" + "project" + "1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySmartCompletionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySmartCompletionTest.java index 7d461e43dcdb..c96c2223259b 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySmartCompletionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySmartCompletionTest.java @@ -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("test" + "project" + "1" + @@ -25,7 +24,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC assertCompletionVariantsInclude(myProjectPom, "junit:junit"); } - public void testInsertDependency() throws IOException { + public void testInsertDependency() { createProjectPom("test\n" + "project\n" + "1\n" + @@ -51,7 +50,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC "\n")); } - public void testInsertManagedDependency() throws IOException { + public void testInsertManagedDependency() { createProjectPom("test\n" + "project\n" + "1\n" + @@ -93,7 +92,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC "\n")); } - public void testInsertManagedDependencyWithTypeAndClassifier() throws IOException { + public void testInsertManagedDependencyWithTypeAndClassifier() { createProjectPom("test\n" + "project\n" + "1\n" + @@ -151,7 +150,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC "\n")); } - public void testCompletionArtifactIdThenVersion() throws IOException { + public void testCompletionArtifactIdThenVersion() { importProject("test" + "project" + "1"); @@ -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("test" + "project" + "1"); @@ -227,7 +226,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC "\n")); } - public void testCompletionArtifactIdThenGroupIdThenCompleteVersion() throws IOException { + public void testCompletionArtifactIdThenGroupIdThenCompleteVersion() { importProject("test" + "project" + "1"); @@ -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("test" + "project" + "1"); @@ -303,7 +302,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC "\n")); } - public void testCompletionArtifactIdInsideManagedDependency() throws IOException { + public void testCompletionArtifactIdInsideManagedDependency() { importProject("test" + "project" + "1"); @@ -341,7 +340,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC "\n")); } - public void testCompletionArtifactIdWithManagedDependency() throws IOException { + public void testCompletionArtifactIdWithManagedDependency() { importProject("test" + "project" + "1\n" + @@ -404,7 +403,7 @@ public class MavenDependencySmartCompletionTest extends MavenDomWithIndicesTestC )); } - public void testCompletionGroupIdWithManagedDependencyWithTypeAndClassifier() throws IOException { + public void testCompletionGroupIdWithManagedDependencyWithTypeAndClassifier() { importProject("test" + "project" + "1\n" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySpecialVersionsCompletionAndResolutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySpecialVersionsCompletionAndResolutionTest.java index 688be099a964..28c0e83dc164 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySpecialVersionsCompletionAndResolutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySpecialVersionsCompletionAndResolutionTest.java @@ -42,7 +42,7 @@ public class MavenDependencySpecialVersionsCompletionAndResolutionTest extends M // assertResolved(myProjectPom, findPsiFile(f)); //} - public void testDoNotHighlightVersionRanges() throws Throwable { + public void testDoNotHighlightVersionRanges() { createProjectPom("test" + "project" + "1" + @@ -58,7 +58,7 @@ public class MavenDependencySpecialVersionsCompletionAndResolutionTest extends M checkHighlighting(); } - public void testDoNotHighlightLatestAndReleaseDependencies() throws Throwable { + public void testDoNotHighlightLatestAndReleaseDependencies() { createProjectPom("test" + "project" + "1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomSoftReferencesInParentTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomSoftReferencesInParentTest.java index 2ce4d7e638d9..ccdd7cdeba04 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomSoftReferencesInParentTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomSoftReferencesInParentTest.java @@ -20,7 +20,7 @@ package org.jetbrains.idea.maven.dom; */ public class MavenDomSoftReferencesInParentTest extends MavenDomTestCase { - public void testDoNotHighlightSourceDirectoryInParentPom() throws Throwable { + public void testDoNotHighlightSourceDirectoryInParentPom() { importProject("test\n" + "project\n" + "1\n" + @@ -36,7 +36,7 @@ public class MavenDomSoftReferencesInParentTest extends MavenDomTestCase { checkHighlighting(); } - public void testHighlightSourceDirectory() throws Throwable { + public void testHighlightSourceDirectory() { importProject("test\n" + "project\n" + "1\n" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomTestCase.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomTestCase.java index dfbdf945a0f7..e01061473e10 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomTestCase.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomTestCase.java @@ -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 search(VirtualFile file) throws IOException { + protected List search(VirtualFile file) { final MapDataContext context = createDataContext(file); UsageTarget[] targets = UsageTargetUtil.findUsageTargets(new DataProvider() { @Override diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenExtensionCompletionAndResolutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenExtensionCompletionAndResolutionTest.java index 96679839f600..94b0a61a919b 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenExtensionCompletionAndResolutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenExtensionCompletionAndResolutionTest.java @@ -40,7 +40,7 @@ public class MavenExtensionCompletionAndResolutionTest extends MavenDomWithIndic "1"); } - public void testGroupIdCompletion() throws Exception { + public void testGroupIdCompletion() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -92,7 +92,7 @@ public class MavenExtensionCompletionAndResolutionTest extends MavenDomWithIndic } } - public void testArtifactWithoutGroupCompletion() throws Exception { + public void testArtifactWithoutGroupCompletion() { createProjectPom("test" + "project" + "1" + @@ -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("test" + @@ -158,7 +158,7 @@ public class MavenExtensionCompletionAndResolutionTest extends MavenDomWithIndic ref.resolve(); // shouldn't throw; } - public void testDoNotHighlightAbsentGroupIdAndVersion() throws Throwable { + public void testDoNotHighlightAbsentGroupIdAndVersion() { createProjectPom("test" + "project" + "1" + @@ -173,7 +173,7 @@ public class MavenExtensionCompletionAndResolutionTest extends MavenDomWithIndic checkHighlighting(); } - public void testHighlightingAbsentArtifactId() throws Throwable { + public void testHighlightingAbsentArtifactId() { createProjectPom("test" + "project" + "1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenFilteredPropertiesCompletionAndResolutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenFilteredPropertiesCompletionAndResolutionTest.java index ef4da06f9cb5..079e1a0fedc6 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenFilteredPropertiesCompletionAndResolutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenFilteredPropertiesCompletionAndResolutionTest.java @@ -559,7 +559,7 @@ public class MavenFilteredPropertiesCompletionAndResolutionTest extends MavenDom assertNotNull(resolveReference(f, "pom.baseUri")); } - public void testDoNotAddReferenceToDelimiterDefinition() throws Exception { + public void testDoNotAddReferenceToDelimiterDefinition() { importProject("test\n" + "project\n" + "1\n" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelValidationTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelValidationTest.java index adab5057253f..d8c970e9cc76 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelValidationTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelValidationTest.java @@ -43,7 +43,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase { assertCompletionVariants(modulePom, "src", "module1", "pom.xml"); } - public void testRelativePathDefaultValue() throws Exception { + public void testRelativePathDefaultValue() { createProjectPom("test" + "project" + "1"); @@ -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, "" + " " + @@ -72,7 +72,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase { assertCompletionVariants(myProjectPom, "dependencies", "dependencyManagement"); } - public void testUnderstandingProfilesSchemaWithoutNamespace() throws Exception { + public void testUnderstandingProfilesSchemaWithoutNamespace() { VirtualFile profiles = createProfilesXml("" + " <" + ""); @@ -90,7 +90,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase { assertCompletionVariantsInclude(settings, "id", "activation"); } - public void testAbsentModelVersion() throws Throwable { + public void testAbsentModelVersion() { myFixture.saveText(myProjectPom, "<project 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, "<project 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, "groupId>" + "<artifactId>" + "<version>"); @@ -150,7 +150,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase { checkHighlighting(); } - public void testAddingProfilesXmlReadingProblemsToProjectTag() throws Exception { + public void testAddingProfilesXmlReadingProblemsToProjectTag() { myFixture.saveText(myProjectPom, "" + " 4.0.0" + @@ -203,7 +203,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase { checkHighlighting(myProjectPom, true, false, true); } - public void testAddingParentReadingProblemsToParentTag() throws Exception { + public void testAddingParentReadingProblemsToParentTag() { createModulePom("parent", "test" + "parent" + @@ -241,7 +241,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase { checkHighlighting(); } - public void testDoNotAddReadingSyntaxProblemsToProjectTag() throws Exception { + public void testDoNotAddReadingSyntaxProblemsToProjectTag() { myFixture.saveText(myProjectPom, "" + " 4.0.0" + @@ -264,7 +264,7 @@ public class MavenModelValidationTest extends MavenDomWithIndicesTestCase { checkHighlighting(); } - public void testDoNotAddDependencyAndModuleProblemsToProjectTag() throws Exception { + public void testDoNotAddDependencyAndModuleProblemsToProjectTag() { myFixture.saveText(myProjectPom, "" + " 4.0.0" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModuleCompletionAndResolutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModuleCompletionAndResolutionTest.java index 9b17c726040e..0fdc4d9f680c 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModuleCompletionAndResolutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModuleCompletionAndResolutionTest.java @@ -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("test" + "project" + "1" + @@ -88,7 +87,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT assertCompletionVariants(module2Pom, "..", "../m1", "m3"); } - public void testDoesNotCompeteIfThereIsNoModules() throws Exception { + public void testDoesNotCompeteIfThereIsNoModules() { createProjectPom("test" + "project" + "1" + @@ -107,7 +106,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT assertCompletionVariants(myProjectPom); } - public void testIncludesAllThePomsAvailable() throws Exception { + public void testIncludesAllThePomsAvailable() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -324,7 +323,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT ""); } - public void testCreatePomQuickFixCustomPomFileName() throws Exception { + public void testCreatePomQuickFixCustomPomFileName() { createProjectPom("test" + "project" + "1" + @@ -399,7 +398,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT ""); } - public void testCreatePomQuickFixTakesGroupAndVersionFromSuperParent() throws Throwable { + public void testCreatePomQuickFixTakesGroupAndVersionFromSuperParent() { createProjectPom("test" + "project" + "1" + @@ -440,7 +439,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT ""); } - public void testCreatePomQuickFixWithProperties() throws Throwable { + public void testCreatePomQuickFixWithProperties() { createProjectPom("test" + "project" + "1" + @@ -468,7 +467,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT assertNotNull(pom); } - public void testCreatePomQuickFixTakesDefaultGroupAndVersionIfNothingToOffer() throws Throwable { + public void testCreatePomQuickFixTakesDefaultGroupAndVersionIfNothingToOffer() { createProjectPom("test" + "project" + "1" + @@ -502,7 +501,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT ""); } - public void testCreateModuleWithParentQuickFix() throws Throwable { + public void testCreateModuleWithParentQuickFix() { createProjectPom("test" + "project" + "1" + @@ -544,7 +543,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT ""); } - public void testCreateModuleWithParentQuickFix2() throws Throwable { + public void testCreateModuleWithParentQuickFix2() { createProjectPom("test" + "project" + "1" + @@ -587,7 +586,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT ""); } - public void testCreateModuleWithParentQuickFix3() throws Throwable { + public void testCreateModuleWithParentQuickFix3() { VirtualFile parentPom = createModulePom("parent", "test" + "project" + @@ -633,7 +632,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT ""); } - public void testDoesNotShowCreatePomQuickFixForEmptyModuleTag() throws Throwable { + public void testDoesNotShowCreatePomQuickFixForEmptyModuleTag() { createProjectPom("test" + "project" + "1" + @@ -652,7 +651,7 @@ public class MavenModuleCompletionAndResolutionTest extends MavenDomWithIndicesT assertNull(getIntentionAtCaret(CREATE_MODULE_INTENTION)); } - public void testDoesNotShowCreatePomQuickFixExistingModule() throws Throwable { + public void testDoesNotShowCreatePomQuickFixExistingModule() { createProjectPom("test" + "project" + "1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenNotManagedProjectInspectionsTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenNotManagedProjectInspectionsTest.java index 6731613860dd..8dd187587265 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenNotManagedProjectInspectionsTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenNotManagedProjectInspectionsTest.java @@ -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. diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPackagingCompletionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPackagingCompletionTest.java index b495e61b5c9b..63b952da45b8 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPackagingCompletionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPackagingCompletionTest.java @@ -16,7 +16,7 @@ package org.jetbrains.idea.maven.dom; public class MavenPackagingCompletionTest extends MavenDomTestCase { - public void testVariants() throws Exception { + public void testVariants() { importProject("test" + "project" + "1"); @@ -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("test" + "project" + "1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenParentCompletionAndResolutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenParentCompletionAndResolutionTest.java index 0cdc9379980c..3621d995c0d6 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenParentCompletionAndResolutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenParentCompletionAndResolutionTest.java @@ -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("test" + "project" + "1"); @@ -181,7 +181,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT assertResolved(myProjectPom, findPsiFile(parent)); } - public void testDoNotHighlightResolvedParentByRelativePathWhenOutsideOfTheProject() throws Throwable { + public void testDoNotHighlightResolvedParentByRelativePathWhenOutsideOfTheProject() { createPomFile(myProjectRoot.getParent(), "test" + "project" + @@ -204,7 +204,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(myProjectPom); } - public void testRelativePathCompletion() throws Throwable { + public void testRelativePathCompletion() { importProject("test" + "project" + "1"); @@ -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("test" + "project" + "1"); createProjectPom("test" + "project" + "1" + @@ -253,7 +253,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT assertCompletionVariants(myProjectPom, "one", "two", "pom.xml"); } - public void testHighlightingUnknownValues() throws Throwable { + public void testHighlightingUnknownValues() { importProject("test" + "project" + "1"); @@ -271,7 +271,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testHighlightingAbsentGroupId() throws Throwable { + public void testHighlightingAbsentGroupId() { importProject("test" + "project" + "1" + @@ -283,7 +283,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testHighlightingAbsentArtifactId() throws Throwable { + public void testHighlightingAbsentArtifactId() { importProject("test" + "project" + "1" + @@ -295,7 +295,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testHighlightingAbsentVersion() throws Throwable { + public void testHighlightingAbsentVersion() { importProject("test" + "project" + "1" + @@ -307,7 +307,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testHighlightingInvalidRelativePath() throws Throwable { + public void testHighlightingInvalidRelativePath() { importProject("test" + "project" + "1"); @@ -326,7 +326,7 @@ public class MavenParentCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testPathQuickFixForInvalidValue() throws Throwable { + public void testPathQuickFixForInvalidValue() { createProjectPom("test" + "project" + "1"); @@ -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("test" + "project" + "1"); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPluginCompletionAndResolutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPluginCompletionAndResolutionTest.java index 574c3b905353..55c3fd0f7818 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPluginCompletionAndResolutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPluginCompletionAndResolutionTest.java @@ -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 "1"); } - public void testGroupIdCompletion() throws Exception { + public void testGroupIdCompletion() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -75,7 +74,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT "maven-compiler-plugin", "maven-deploy-plugin"); } - public void testVersionCompletion() throws Exception { + public void testVersionCompletion() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + @@ -168,7 +167,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT ref.resolve(); // shouldn't throw; } - public void testDoNotHighlightAbsentGroupIdAndVersion() throws Throwable { + public void testDoNotHighlightAbsentGroupIdAndVersion() { createProjectPom("test" + "project" + "1" + @@ -183,7 +182,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testHighlightingAbsentArtifactId() throws Throwable { + public void testHighlightingAbsentArtifactId() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -225,7 +224,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT ""); } - public void testNoParametersForUnknownPlugin() throws Exception { + public void testNoParametersForUnknownPlugin() { createProjectPom("test" + "project" + "1" + @@ -244,7 +243,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT assertCompletionVariants(myProjectPom); } - public void testNoParametersIfNothingIsSpecified() throws Exception { + public void testNoParametersIfNothingIsSpecified() { createProjectPom("test" + "project" + "1" + @@ -262,7 +261,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT assertCompletionVariants(myProjectPom); } - public void testResolvingParamaters() throws Exception { + public void testResolvingParamaters() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -358,7 +357,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testDontHighlightGoalsForUnresolvedPlugin() throws Throwable { + public void testDontHighlightGoalsForUnresolvedPlugin() { createProjectPom("test\n" + "project\n" + "1\n" + @@ -393,7 +392,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testGoalsCompletionAndHighlightingInPluginManagement() throws Throwable { + public void testGoalsCompletionAndHighlightingInPluginManagement() { createProjectPom("test" + "project" + "1" + @@ -441,7 +440,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testGoalsResolution() throws Throwable { + public void testGoalsResolution() { createProjectPom("test" + "project" + "1" + @@ -515,7 +514,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT assertUnresolved(myProjectPom); } - public void testPhaseCompletionAndHighlighting() throws Throwable { + public void testPhaseCompletionAndHighlighting() { createProjectPom("test" + "project" + "1" + @@ -555,7 +554,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testNoExecutionParametersIfNoGoalNorIdAreSpecified() throws Exception { + public void testNoExecutionParametersIfNoGoalNorIdAreSpecified() { createProjectPom("test" + "project" + "1" + @@ -578,7 +577,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT assertCompletionVariants(myProjectPom); } - public void testExecutionParametersForSpecificGoal() throws Exception { + public void testExecutionParametersForSpecificGoal() { createProjectPom("test" + "project" + "1" + @@ -606,7 +605,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT assertFalse(variants.toString(), variants.contains("testExcludes")); } - public void testExecutionParametersForDefaultGoalExecution() throws Exception { + public void testExecutionParametersForDefaultGoalExecution() { createProjectPom("test" + "project" + "1" + @@ -632,7 +631,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT assertFalse(variants.toString(), variants.contains("testExcludes")); } - public void testExecutionParametersForSeveralSpecificGoals() throws Exception { + public void testExecutionParametersForSeveralSpecificGoals() { createProjectPom("test" + "project" + "1" + @@ -659,7 +658,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT assertCompletionVariantsInclude(myProjectPom, "excludes", "testExcludes"); } - public void testAliasCompletion() throws Exception { + public void testAliasCompletion() { createProjectPom("test" + "project" + "1" + @@ -678,7 +677,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT assertCompletionVariantsInclude(myProjectPom, "warSourceExcludes", "excludes"); } - public void testListElementsCompletion() throws Exception { + public void testListElementsCompletion() { createProjectPom("test" + "project" + "1" + @@ -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("test" + @@ -723,7 +722,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT assertCompletionVariants(myProjectPom, "additionalConfig", "config"); } - public void testDoNotHighlightUnknownElementsUnderLists() throws Throwable { + public void testDoNotHighlightUnknownElementsUnderLists() { createProjectPom("test" + "project" + "1" + @@ -744,7 +743,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testArrayElementsCompletion() throws Exception { + public void testArrayElementsCompletion() { createProjectPom("test" + "project" + "1" + @@ -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("test" + @@ -810,7 +809,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT assertDocumentation("Type: java.lang.String
Expression: ${maven.compiler.source}

The -source argument for the Java compiler."); } - public void testDoNotCompleteNorHighlightNonPluginConfiguration() throws Throwable { + public void testDoNotCompleteNorHighlightNonPluginConfiguration() { createProjectPom("test" + "project" + "1" + @@ -830,7 +829,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testDoNotHighlightInnerParameters() throws Throwable { + public void testDoNotHighlightInnerParameters() { createProjectPom("test" + "project" + "1" + @@ -851,7 +850,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testDoNotHighlightRequiredParametersWithDefaultValues() throws Throwable { + public void testDoNotHighlightRequiredParametersWithDefaultValues() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -895,7 +894,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testDoNotCompleteParameterAttributes() throws Throwable { + public void testDoNotCompleteParameterAttributes() { createProjectPom("test" + "project" + "1" + @@ -914,7 +913,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT assertCompletionVariants(myProjectPom, "combine.children", "combine.self"); } - public void testWorksWithPropertiesInPluginId() throws Throwable { + public void testWorksWithPropertiesInPluginId() { createProjectPom("test" + "project" + "1" + @@ -952,7 +951,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testDoNotHighlightPropertiesForUnknownPlugins() throws Throwable { + public void testDoNotHighlightPropertiesForUnknownPlugins() { createProjectPom("test" + "project" + "1" + @@ -973,7 +972,7 @@ public class MavenPluginCompletionAndResolutionTest extends MavenDomWithIndicesT checkHighlighting(); } - public void testTellNobodyThatIdeaIsRulezzz() throws Exception { + public void testTellNobodyThatIdeaIsRulezzz() { createProjectPom("test" + "project" + "1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyCompletionAndResolutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyCompletionAndResolutionTest.java index c7b8df2a2837..657cbebf25a5 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyCompletionAndResolutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyCompletionAndResolutionTest.java @@ -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("test" + @@ -776,7 +776,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase { assertUnresolved(myProjectPom); } - public void testHighlightUnresolvedProperties() throws Exception { + public void testHighlightUnresolvedProperties() { createProjectPom("test\n" + "child\n" + "1\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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + @@ -926,7 +926,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase { assertCompletionVariantsInclude(myProjectPom, "project.groupId", "groupId"); } - public void testCompletingAfterOpenBraceAndSomeText() throws Exception { + public void testCompletingAfterOpenBraceAndSomeText() { createProjectPom("test" + "project" + "1" + @@ -937,7 +937,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase { assertDoNotContain(variants, "groupId"); } - public void testCompletingAfterOpenBraceAndSomeTextWithDot() throws Exception { + public void testCompletingAfterOpenBraceAndSomeTextWithDot() { createProjectPom("test" + "project" + "1" + @@ -948,7 +948,7 @@ public class MavenPropertyCompletionAndResolutionTest extends MavenDomTestCase { assertDoNotContain(variants, "project.name"); } - public void testDoNotCompleteAfterNonWordCharacter() throws Exception { + public void testDoNotCompleteAfterNonWordCharacter() { createProjectPom("test" + "project" + "1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyFindUsagesTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyFindUsagesTest.java index 3019068a764b..27fafaf9855b 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyFindUsagesTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyFindUsagesTest.java @@ -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("test" + "module1" + "<version>1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyResolverTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyResolverTest.java index fe58f73dec06..2eb46e181ac9 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyResolverTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenPropertyResolverTest.java @@ -46,7 +46,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase { } - public void testResolvingProjectAttributes() throws Exception { + public void testResolvingProjectAttributes() { importProject("test" + "project" + "1"); @@ -55,7 +55,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase { assertEquals("test", resolve("${pom.groupId}", myProjectPom)); } - public void testResolvingProjectParentAttributes() throws Exception { + public void testResolvingProjectParentAttributes() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "1"); @@ -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("test" + "project" + "1"); @@ -89,7 +89,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase { resolve("${project.build.sourceDirectory}", myProjectPom)); } - public void testResolvingProjectAndParentProperties() throws Exception { + public void testResolvingProjectAndParentProperties() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -169,7 +169,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase { assertEquals("${prop5}", resolve("${prop5}", myProjectPom)); } - public void testSophisticatedPropertyNameDoesNotBreakResolver() throws Exception { + public void testSophisticatedPropertyNameDoesNotBreakResolver() { importProject("test" + "project" + "1"); @@ -178,7 +178,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase { assertEquals("${#ARRAY[@]}", resolve("${#ARRAY[@]}", myProjectPom)); } - public void testProjectPropertiesWithProfiles() throws Exception { + public void testProjectPropertiesWithProfiles() { createProjectPom("test" + "project" + "1" + @@ -212,7 +212,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase { assertEquals("value3", resolve("${prop}", myProjectPom)); } - public void testResolvingBasedirProperties() throws Exception { + public void testResolvingBasedirProperties() { importProject("test" + "project" + "1"); @@ -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("test" + "project" + "1"); @@ -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("test" + "project" + "1"); @@ -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("test" + "project" + "1"); @@ -272,7 +272,7 @@ public class MavenPropertyResolverTest extends MavenImportingTestCase { assertEquals("value", resolve("${uncomitted}", myProjectPom)); } - public void testEscapingProperties() throws Exception { + public void testEscapingProperties() { importProject("test" + "project" + "1"); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenSpellcheckerTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenSpellcheckerTest.java index 6b7290330af4..bbea05709118 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenSpellcheckerTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenSpellcheckerTest.java @@ -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("test\n" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenTypingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenTypingTest.java index f7ec5fca00bd..dff77167aed4 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenTypingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenTypingTest.java @@ -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("test" + "project" + "1" + @@ -33,7 +31,7 @@ public class MavenTypingTest extends MavenDomTestCase { "${}"); } - public void testTypingOpenBraceInsideOtherBrace() throws Exception { + public void testTypingOpenBraceInsideOtherBrace() { createProjectPom("test" + "project" + "1" + @@ -46,7 +44,7 @@ public class MavenTypingTest extends MavenDomTestCase { "${{"); } - public void testTypingOpenBraceWithExistingClosedBrace() throws Exception { + public void testTypingOpenBraceWithExistingClosedBrace() { createProjectPom("test" + "project" + "1" + @@ -59,7 +57,7 @@ public class MavenTypingTest extends MavenDomTestCase { "${}"); } - public void testTypingOpenBraceBeforeChar() throws Exception { + public void testTypingOpenBraceBeforeChar() { createProjectPom("test" + "project" + "1" + @@ -72,7 +70,7 @@ public class MavenTypingTest extends MavenDomTestCase { "${foo"); } - public void testTypingOpenBraceBeforeWhitespace() throws Exception { + public void testTypingOpenBraceBeforeWhitespace() { createProjectPom("test" + "project" + "1" + @@ -85,7 +83,7 @@ public class MavenTypingTest extends MavenDomTestCase { "${} foo"); } - public void testTypingOpenBraceWithoutDollar() throws Exception { + public void testTypingOpenBraceWithoutDollar() { createProjectPom("test" + "project" + "1" + @@ -114,7 +112,7 @@ public class MavenTypingTest extends MavenDomTestCase { " ${}"); } - public void testTypingOpenBraceInsideTagDoesNothing() throws Exception { + public void testTypingOpenBraceInsideTagDoesNothing() { if (ignore()) return; createProjectPom("test" + @@ -236,7 +234,7 @@ public class MavenTypingTest extends MavenDomTestCase { " $"); } - 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); } } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenClasspathsAndSearchScopesTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenClasspathsAndSearchScopesTest.java index 98388a0b85f3..dd8537986ab7 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenClasspathsAndSearchScopesTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenClasspathsAndSearchScopesTest.java @@ -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", "test" + "m" + "1" + @@ -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", "test" + "m1" + "1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutionTest.java index f036a9b16a2a..8b2facbe8377 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutionTest.java @@ -50,7 +50,7 @@ public class MavenExecutionTest extends MavenImportingTestCase { new WriteAction() { @Override - protected void run(@NotNull Result objectResult) throws Throwable { + protected void run(@NotNull Result objectResult) { createProjectPom("test" + "project" + "1"); @@ -69,7 +69,7 @@ public class MavenExecutionTest extends MavenImportingTestCase { new WriteAction() { @Override - protected void run(@NotNull Result objectResult) throws Throwable { + protected void run(@NotNull Result objectResult) { createStdProjectFolders(); importProject("test" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenJUnitPatcherTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenJUnitPatcherTest.java index 4d285412a00c..47921c71a294 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenJUnitPatcherTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenJUnitPatcherTest.java @@ -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", "test" + "m1" + "1" + @@ -65,7 +65,7 @@ public class MavenJUnitPatcherTest extends MavenImportingTestCase { javaParameters.getVMParametersList().getList()); } - public void testVmPropertiesResolve() throws Exception { + public void testVmPropertiesResolve() { VirtualFile m1 = createModulePom("m1", "test" + "m1" + "1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/ArtifactsDownloadingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/ArtifactsDownloadingTest.java index 322b2c8fbf7c..c607560094d4 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/ArtifactsDownloadingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/ArtifactsDownloadingTest.java @@ -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("test" + "project" + "1" + @@ -53,7 +53,7 @@ public class ArtifactsDownloadingTest extends ArtifactsDownloadingTestCase { assertTrue(javadoc.exists()); } - public void testIgnoringOfflineSetting() throws Exception { + public void testIgnoringOfflineSetting() { importProject("test" + "project" + "1" + @@ -91,7 +91,7 @@ public class ArtifactsDownloadingTest extends ArtifactsDownloadingTestCase { assertTrue(javadoc.exists()); } - public void testDownloadingSpecificDependency() throws Exception { + public void testDownloadingSpecificDependency() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -253,7 +253,7 @@ public class ArtifactsDownloadingTest extends ArtifactsDownloadingTestCase { } } - public void testDownloadingPlugins() throws Exception { + public void testDownloadingPlugins() { try { importProject("test" + "project" + @@ -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()); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/DependenciesImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/DependenciesImportingTest.java index 883617ab7143..fc17bc971dc7 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/DependenciesImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/DependenciesImportingTest.java @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -80,7 +80,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { Collections.emptyList(), Collections.emptyList()); } - public void testTestJarDependencies() throws Exception { + public void testTestJarDependencies() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -193,7 +193,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleLibDeps("project", "Maven: group:lib:1"); } - public void testInterModuleDependencies() throws Exception { + public void testInterModuleDependencies() { createProjectPom("test" + "project" + "pom" + @@ -225,7 +225,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("m1", "m2"); } - public void testInterModuleDependenciesWithClassifier() throws Exception { + public void testInterModuleDependenciesWithClassifier() { createProjectPom("test" + "project" + "pom" + @@ -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("test" + "project" + "pom" + @@ -296,7 +296,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("m1"); } - public void testInterModuleDependenciesWithoutModuleVersions() throws Exception { + public void testInterModuleDependenciesWithoutModuleVersions() { createProjectPom("test" + "project" + "pom" + @@ -334,7 +334,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("m1", "m2"); } - public void testInterModuleDependenciesWithVersionRanges() throws Exception { + public void testInterModuleDependenciesWithVersionRanges() { createProjectPom("test" + "project" + "pom" + @@ -367,7 +367,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("m1", "m2"); } - public void testInterModuleDependenciesWithLatestVersion() throws Exception { + public void testInterModuleDependenciesWithLatestVersion() { createProjectPom("test" + "project" + "pom" + @@ -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("test" + "project" + "pom" + @@ -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("test" + "project" + "pom" + @@ -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("test" + "project" + "pom" + @@ -512,7 +512,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleLibDeps("m1", "Maven: test:m2:RELEASE"); } - public void testInterSnapshotModuleDependenciesWithSnapshotVersionRanges() throws Exception { + public void testInterSnapshotModuleDependenciesWithSnapshotVersionRanges() { createProjectPom("test" + "project" + "pom" + @@ -545,7 +545,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("m1", "m2"); } - public void testInterSnapshotModuleDependenciesWithVersionRanges() throws Exception { + public void testInterSnapshotModuleDependenciesWithVersionRanges() { createProjectPom("test" + "project" + "pom" + @@ -578,7 +578,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("m1", "m2"); } - public void testInterModuleDependenciesWithoutModuleGroup() throws Exception { + public void testInterModuleDependenciesWithoutModuleGroup() { createProjectPom("test" + "project" + "pom" + @@ -616,7 +616,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("m1", "m2"); } - public void testInterModuleDependenciesIfThereArePropertiesInArtifactHeader() throws Exception { + public void testInterModuleDependenciesIfThereArePropertiesInArtifactHeader() { createProjectPom("test" + "project" + "pom" + @@ -659,7 +659,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("m1", "m2"); } - public void testInterModuleDependenciesIfThereArePropertiesInArtifactHeaderDefinedInParent() throws Exception { + public void testInterModuleDependenciesIfThereArePropertiesInArtifactHeaderDefinedInParent() { createProjectPom("${groupProp}" + "parent" + "${versionProp}" + @@ -705,7 +705,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("m1", "m2"); } - public void testDependencyOnSelf() throws Exception { + public void testDependencyOnSelf() { importProject("test" + "project" + "1" + @@ -721,7 +721,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("project"); } - public void testDependencyOnSelfWithPomPackaging() throws Exception { + public void testDependencyOnSelfWithPomPackaging() { importProject("test" + "project" + "1" + @@ -738,7 +738,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("project"); } - public void testIntermoduleDependencyOnTheSameModuleWithDifferentTypes() throws Exception { + public void testIntermoduleDependencyOnTheSameModuleWithDifferentTypes() { createProjectPom("test" + "project" + "pom" + @@ -777,7 +777,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("m1", "m2", "m2"); } - public void testDependencyScopes() throws Exception { + public void testDependencyScopes() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "pom" + @@ -862,7 +862,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDepScope("m1", "m4", DependencyScope.TEST); } - public void testDependenciesAreNotExported() throws Exception { + public void testDependenciesAreNotExported() { createProjectPom("test" + "project" + "pom" + @@ -898,7 +898,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertExportedDeps("m1"); } - public void testTransitiveDependencies() throws Exception { + public void testTransitiveDependencies() { createProjectPom("test" + "project" + "pom" + @@ -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("test" + "project" + "pom" + @@ -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("test" + @@ -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("test" + "project" + "pom" + @@ -1101,7 +1101,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleLibDeps("m1"); } - public void testPropertiesInInheritedDependencies() throws Exception { + public void testPropertiesInInheritedDependencies() { createProjectPom("test" + "project" + "1" + @@ -1134,7 +1134,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleLibDep("m", "Maven: group:lib:2"); } - public void testPropertyInTheModuleDependency() throws Exception { + public void testPropertyInTheModuleDependency() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -1212,7 +1212,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleLibDeps("m", "Maven: group:id:1"); } - public void testPropertyInTheManagedModuleDependencyVersion() throws Exception { + public void testPropertyInTheManagedModuleDependencyVersion() { createProjectPom("test" + "project" + "1" + @@ -1258,7 +1258,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleLibDeps("m", "Maven: group:id:1"); } - public void testPomTypeDependency() throws Exception { + public void testPomTypeDependency() { createProjectPom("test" + "project" + "1" + @@ -1275,7 +1275,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { importProject(); // shouldn't throw any exception } - public void testPropertyInTheManagedModuleDependencyVersionOfPomType() throws Exception { + public void testPropertyInTheManagedModuleDependencyVersionOfPomType() { createProjectPom("test" + "project" + "1" + @@ -1392,7 +1392,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertTrue(myProjectsTree.findProject(myProjectPom).hasUnresolvedArtifacts()); } - public void testCanResolveDependenciesWhenExtensionPluginNotFound() throws Exception { + public void testCanResolveDependenciesWhenExtensionPluginNotFound() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -1494,7 +1494,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { "Maven: junit:junit:jdk5:4.0"); } - public void testDoNotResetUserLibraryDependencies() throws Exception { + public void testDoNotResetUserLibraryDependencies() { importProject("test" + "project" + "1" + @@ -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", "test" + "m1" + @@ -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", "test" + "m1" + @@ -1581,7 +1581,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleModuleDeps("m1"); } - public void testDoNotResetCustomRootEntries() throws Exception { + public void testDoNotResetCustomRootEntries() { importProject("test" + "project" + "1" + @@ -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", "test" + "m1" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -1790,7 +1790,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { Collections.emptyList()); } - public void testRemovingPreviousSystemPathForForSystemLibraries() throws Exception { + public void testRemovingPreviousSystemPathForForSystemLibraries() { importProject("test" + "project" + "1" + @@ -1833,7 +1833,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { Collections.emptyList()); } - public void testRemovingUnusedLibraries() throws Exception { + public void testRemovingUnusedLibraries() { createProjectPom("test" + "project" + "1" + @@ -1918,7 +1918,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { "Maven: group:lib3:1"); } - public void testDoNoRemoveUnusedLibraryIfItWasChanged() throws Exception { + public void testDoNoRemoveUnusedLibraryIfItWasChanged() { importProject("test" + "project" + "1" + @@ -1957,7 +1957,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { "Maven: group:lib2:1"); } - public void testDoNoRemoveUserProjectLibraries() throws Exception { + public void testDoNoRemoveUserProjectLibraries() { importProject("test" + "project" + "1"); @@ -1976,7 +1976,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertModuleLibDeps("project", "lib"); } - public void testDoNoRemoveUnusedUserProjectLibraries() throws Exception { + public void testDoNoRemoveUnusedUserProjectLibraries() { importProject("test" + "project" + "1"); @@ -1993,7 +1993,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertProjectLibraries("lib"); } - public void testRemovingUnusedLibrariesIfProjectRemoved() throws Exception { + public void testRemovingUnusedLibrariesIfProjectRemoved() { createProjectPom("test" + "project" + "1" + @@ -2047,7 +2047,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertProjectLibraries("Maven: group:lib1:1"); } - public void testRemovingUnusedLibraryWithClassifier() throws Exception { + public void testRemovingUnusedLibraryWithClassifier() { importProject("test" + "project" + "1" + @@ -2111,7 +2111,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { }); } - public void testEjbDependenciesInJarProject() throws Exception { + public void testEjbDependenciesInJarProject() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "1"); @@ -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("test" + "project" + "pom" + @@ -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("test" + "project" + "pom" + @@ -2398,7 +2398,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assert orderEntries[3] instanceof ModuleSourceOrderEntry; } - public void testSaveJdkPositionSystemDependency() throws Exception { + public void testSaveJdkPositionSystemDependency() { createProjectPom("test" + "m1" + "1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/FoldersImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/FoldersImportingTest.java index 6a10e8916f72..f5eaf0fb9e48 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/FoldersImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/FoldersImportingTest.java @@ -39,7 +39,7 @@ public class FoldersImportingTest extends MavenImportingTestCase { // ); //} - public void testSimpleProjectStructure() throws Exception { + public void testSimpleProjectStructure() { createStdProjectFolders(); importProject("test" + @@ -55,7 +55,7 @@ public class FoldersImportingTest extends MavenImportingTestCase { assertTestResources("project", "src/test/resources"); } - public void testInvalidProjectHasContentRoot() throws Exception { + public void testInvalidProjectHasContentRoot() { importProject("test" + "project" + "1"); @@ -64,7 +64,7 @@ public class FoldersImportingTest extends MavenImportingTestCase { assertContentRoots("project", getProjectPath()); } - public void testDoNotResetFoldersAfterResolveIfProjectIsInvalid() throws Exception { + public void testDoNotResetFoldersAfterResolveIfProjectIsInvalid() { createStdProjectFolders(); importProject("test" + @@ -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("test" + @@ -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("test" + @@ -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("test" + "project" + "1"); @@ -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("test" + @@ -813,7 +813,7 @@ public class FoldersImportingTest extends MavenImportingTestCase { assertProjectOutput("project"); } - public void testExcludingCustomOutputDirectories() throws Exception { + public void testExcludingCustomOutputDirectories() { importProject("test" + "project" + "1" + @@ -835,7 +835,7 @@ public class FoldersImportingTest extends MavenImportingTestCase { getProjectPath() + "/testCustom"); } - public void testExcludingCustomOutputUnderTargetUsingStandardVariable() throws Exception { + public void testExcludingCustomOutputUnderTargetUsingStandardVariable() { importProject("test" + "project" + "1" + @@ -853,7 +853,7 @@ public class FoldersImportingTest extends MavenImportingTestCase { getProjectPath() + "/target/testCustom"); } - public void testDoNotExcludeExcludeOutputDirectoryWhenItPointstoRoot() throws Exception { + public void testDoNotExcludeExcludeOutputDirectoryWhenItPointstoRoot() { importProject("test" + "project" + "1" + @@ -872,7 +872,7 @@ public class FoldersImportingTest extends MavenImportingTestCase { getProjectPath()); } - public void testOutputDirsOutsideOfContentRoot() throws Exception { + public void testOutputDirsOutsideOfContentRoot() { importProject("test" + "project" + "1" + @@ -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("test" + @@ -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("test" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/GroovyImporterTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/GroovyImporterTest.java index c6848cf95c79..09ca78b22b09 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/GroovyImporterTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/GroovyImporterTest.java @@ -22,7 +22,7 @@ public class GroovyImporterTest extends MavenImportingTestCase { setRepositoryPath(new File(myDir, "repo").getPath()); } - public void testConfiguringFacetWithoutLibrary() throws Exception { + public void testConfiguringFacetWithoutLibrary() { importProject("test" + "project" + "1" + @@ -41,7 +41,7 @@ public class GroovyImporterTest extends MavenImportingTestCase { assertUnorderedElementsAreEqual(GroovyConfigUtils.getInstance().getSDKLibrariesByModule(getModule("project"))); } - public void testConfiguringFacetWithLibrary() throws Exception { + public void testConfiguringFacetWithLibrary() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + @@ -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", diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/IgnoresImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/IgnoresImportingTest.java index 09600ad4aa3d..017f1c479989 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/IgnoresImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/IgnoresImportingTest.java @@ -28,7 +28,7 @@ public class IgnoresImportingTest extends MavenImportingTestCase { initProjectsManager(false); } - public void testDoNotImportIgnoredProjects() throws Exception { + public void testDoNotImportIgnoredProjects() { VirtualFile p1 = createModulePom("project1", "test" + "project1" + @@ -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", diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/InvalidProjectImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/InvalidProjectImportingTest.java index bb8249586862..f05a9134c6e5 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/InvalidProjectImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/InvalidProjectImportingTest.java @@ -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("test" + "${undefined}" + "1"); @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -104,7 +104,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase { "Module 'foo' not found"); } - public void testMissingModules() throws Exception { + public void testMissingModules() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + // invalid tag @@ -215,7 +215,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase { assertModules("project", "foo"); } - public void testNonPOMProjectWithModules() throws Exception { + public void testNonPOMProjectWithModules() { createProjectPom("test" + "project" + "1" + @@ -233,7 +233,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase { assertModules("project", "foo"); } - public void testInvalidRepositoryLayout() throws Exception { + public void testInvalidRepositoryLayout() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -276,7 +276,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase { assertProblems(root); } - public void testDoNotFailIfDistributionRepositoryHasEmptyValues() throws Exception { + public void testDoNotFailIfDistributionRepositoryHasEmptyValues() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "pom" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "pom" + @@ -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("test" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -527,7 +527,7 @@ public class InvalidProjectImportingTest extends MavenImportingTestCase { assertProblems(getRootProjects().get(0)); } - public void testDoesNotReportExtensionsThatDoNotHaveJarFiles() throws Exception { + public void testDoesNotReportExtensionsThatDoNotHaveJarFiles() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "pom" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenJGitBuildNumberTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenJGitBuildNumberTest.java index 3743c4e0b518..a7a55bbf88fd 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenJGitBuildNumberTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenJGitBuildNumberTest.java @@ -25,7 +25,7 @@ import java.util.List; */ public class MavenJGitBuildNumberTest extends MavenDomTestCase { - public void testCompletion() throws Exception { + public void testCompletion() { importProject("test\n" + "project\n" + "1\n" + @@ -63,7 +63,7 @@ public class MavenJGitBuildNumberTest extends MavenDomTestCase { assertContain(variants, "git.commitsCount"); } - public void testHighlighting() throws Exception { + public void testHighlighting() { createModulePom("m", "m\n" + "1\n" + "\n" + @@ -109,7 +109,7 @@ public class MavenJGitBuildNumberTest extends MavenDomTestCase { checkHighlighting(pom, true, false, true); } - public void testNoPluginHighlighting() throws Exception { + public void testNoPluginHighlighting() { importProject("test\n" + "project\n" + "1\n" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenModuleBuilderTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenModuleBuilderTest.java index befa77955cad..f0dd740a5505 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenModuleBuilderTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenModuleBuilderTest.java @@ -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("test" + @@ -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("test" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenShortcutsManagerTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenShortcutsManagerTest.java index 3c42ad7894cf..50a8a22ac43a 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenShortcutsManagerTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenShortcutsManagerTest.java @@ -52,7 +52,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase { } } - public void testRefreshingActionsOnImport() throws Exception { + public void testRefreshingActionsOnImport() { assertTrue(getProjectActions().isEmpty()); VirtualFile p1 = createModulePom("p1", "test" + @@ -67,7 +67,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase { assertEmptyKeymap(); } - public void testRefreshingOnProjectRead() throws Exception { + public void testRefreshingOnProjectRead() { importProject("test" + "project" + "1"); @@ -92,7 +92,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase { assertKeymapContains(myProjectPom, goal); } - public void testRefreshingOnPluginResolve() throws Exception { + public void testRefreshingOnPluginResolve() { importProject("test" + "project" + "1"); @@ -120,7 +120,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase { assertKeymapContains(myProjectPom, goal); } - public void testActionWhenSeveralSimilarPlugins() throws Exception { + public void testActionWhenSeveralSimilarPlugins() { importProject("test" + "project" + "1"); @@ -150,7 +150,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase { assertKeymapContains(myProjectPom, goal); } - public void testRefreshingOnProjectAddition() throws Exception { + public void testRefreshingOnProjectAddition() { importProject("test" + "project" + "1"); @@ -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", "test" + "p1" + "1"); @@ -208,7 +208,7 @@ public class MavenShortcutsManagerTest extends MavenImportingTestCase { assertKeymapContains(p2, goal); } - public void testRefreshingActionsOnChangingIgnoreFlag() throws Exception { + public void testRefreshingActionsOnChangingIgnoreFlag() { VirtualFile p1 = createModulePom("p1", "test" + "p1" + "1"); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MiscImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MiscImportingTest.java index 5dc20cd09ca6..3a5c5b26e534 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MiscImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MiscImportingTest.java @@ -62,7 +62,7 @@ public class MiscImportingTest extends MavenImportingTestCase { }); } - public void testRestarting() throws Exception { + public void testRestarting() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "1"); @@ -148,7 +148,7 @@ public class MiscImportingTest extends MavenImportingTestCase { assertRootsChanged(1); } - public void testResolvingFiresRootChangesOnlyOnce() throws Exception { + public void testResolvingFiresRootChangesOnlyOnce() { importProject("test" + "project" + "1"); @@ -156,7 +156,7 @@ public class MiscImportingTest extends MavenImportingTestCase { assertRootsChanged(1); } - public void testImportingWithLibrariesAndFacetsFiresRootChangesOnlyOnce() throws Exception { + public void testImportingWithLibrariesAndFacetsFiresRootChangesOnlyOnce() { importProject("test" + "project" + "1" + @@ -178,7 +178,7 @@ public class MiscImportingTest extends MavenImportingTestCase { assertRootsChanged(1); } - public void testFacetsDoNotFireRootsChanges() throws Exception { + public void testFacetsDoNotFireRootsChanges() { importProject("test" + "project" + "1" + @@ -187,7 +187,7 @@ public class MiscImportingTest extends MavenImportingTestCase { assertRootsChanged(1); } - public void testDoNotRecreateModulesBeforeResolution() throws Exception { + public void testDoNotRecreateModulesBeforeResolution() { importProject("test" + "project" + "1"); @@ -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("test" + @@ -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 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 extensionPoint = Extensions.getRootArea().getExtensionPoint(MavenImporter.EXTENSION_POINT_NAME); extensionPoint.registerExtension(extension); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/ReimportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/ReimportingTest.java index a6299422b630..8fac5834ba99 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/ReimportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/ReimportingTest.java @@ -73,7 +73,7 @@ public class ReimportingTest extends MavenImportingTestCase { assertModuleGroupPath("project", "group"); } - public void testAddingNewModule() throws Exception { + public void testAddingNewModule() { createProjectPom("test" + "project" + "pom" + @@ -93,7 +93,7 @@ public class ReimportingTest extends MavenImportingTestCase { assertModules("project", "m1", "m2", "m3"); } - public void testRemovingObsoleteModule() throws Exception { + public void testRemovingObsoleteModule() { createProjectPom("test" + "project" + "pom" + @@ -108,7 +108,7 @@ public class ReimportingTest extends MavenImportingTestCase { assertModules("project", "m1"); } - public void testDoesNotRemoveObsoleteModuleIfUserSaysNo() throws Exception { + public void testDoesNotRemoveObsoleteModuleIfUserSaysNo() { createProjectPom("test" + "project" + "pom" + @@ -123,7 +123,7 @@ public class ReimportingTest extends MavenImportingTestCase { assertModules("project", "m1", "m2"); } - public void testDoesNotAskUserTwiceToRemoveTheSameModule() throws Exception { + public void testDoesNotAskUserTwiceToRemoveTheSameModule() { createProjectPom("test" + "project" + "pom" + @@ -155,7 +155,7 @@ public class ReimportingTest extends MavenImportingTestCase { assertModules("project", "m1", "m2", "userModule"); } - public void testRemovingAndCreatingModulesForAggregativeProjects() throws Exception { + public void testRemovingAndCreatingModulesForAggregativeProjects() { createModulePom("m1", "test" + "m1" + "1" + @@ -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("test" + "project" + "pom" + @@ -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", "test" + "m1" + "1"); @@ -319,7 +319,7 @@ public class ReimportingTest extends MavenImportingTestCase { ""; } - public void testReimportingWhenModuleHaveRootOfTheParent() throws Exception { + public void testReimportingWhenModuleHaveRootOfTheParent() { createProjectSubDir("m1/res"); createProjectPom("test" + "project" + @@ -348,7 +348,7 @@ public class ReimportingTest extends MavenImportingTestCase { assertEquals(0, counter.get()); } - public void testParentVersionProperty() throws Exception { + public void testParentVersionProperty() { String parentPomTemplate = "test\n" + "project\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("test\n" + "project\n" + "1\n" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/SnapshotDependenciesImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/SnapshotDependenciesImportingTest.java index 60d1f366b55b..af6f9e240b79 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/SnapshotDependenciesImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/SnapshotDependenciesImportingTest.java @@ -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("test" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/StructureImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/StructureImportingTest.java index f1175e19270d..c054484f14ac 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/StructureImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/StructureImportingTest.java @@ -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("test" + "project" + "1"); @@ -43,7 +43,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertTrue(ModuleRootManager.getInstance(getModule("project")).isSdkInherited()); } - public void testDoNotResetSomeSettingsAfterReimport() throws Exception { + public void testDoNotResetSomeSettingsAfterReimport() { importProject("test" + "project" + "1"); @@ -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("test" + "project" + "pom" + @@ -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("test" + "project" + "pom" + @@ -112,7 +112,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertModules("project", "m1", "m2"); } - public void testModulesWithSlashesAtTheEnds() throws Exception { + public void testModulesWithSlashesAtTheEnds() { createProjectPom("test" + "project" + "pom" + @@ -140,7 +140,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertModules("project", "m1", "m2", "m3"); } - public void testModulesWithSameArtifactId() throws Exception { + public void testModulesWithSameArtifactId() { createProjectPom("test" + "project" + "pom" + @@ -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("test" + "project" + "pom" + @@ -186,7 +186,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertModules("project", "m (1)", "m (2)"); } - public void testModuleWithRelativePath() throws Exception { + public void testModuleWithRelativePath() { createProjectPom("test" + "project" + "pom" + @@ -204,7 +204,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertModules("project", "m"); } - public void testModuleWithRelativeParent() throws Exception { + public void testModuleWithRelativeParent() { createProjectPom("test" + "project" + "1" + @@ -224,7 +224,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertModules("project"); } - public void testModulePathsAsProperties() throws Exception { + public void testModulePathsAsProperties() { createProjectPom("test" + "project" + "pom" + @@ -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("" + " org.apache.maven.archetype.test" + " test-create-2" + @@ -273,7 +273,7 @@ public class StructureImportingTest extends MavenImportingTestCase { "pom"); } - public void testParentWithoutARelativePath() throws Exception { + public void testParentWithoutARelativePath() { createProjectPom("test" + "project" + "pom" + @@ -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("test" + "project" + "pom" + @@ -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", "test" + "project1" + @@ -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("test" + "project" + "1" + @@ -497,7 +497,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertModuleGroupPath("m2", "m1 and modules"); } - public void testModuleGroupsWhenNotCreatingModulesForAggregatorProjects() throws Exception { + public void testModuleGroupsWhenNotCreatingModulesForAggregatorProjects() { createProjectPom("test" + "project" + "1" + @@ -530,7 +530,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertModuleGroupPath("module2", "module1 and modules"); } - public void testReimportingProjectWhenCreatingModuleGroupsSettingChanged() throws Exception { + public void testReimportingProjectWhenCreatingModuleGroupsSettingChanged() { createProjectPom("test" + "project" + "1" + @@ -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", "test" + "project1" + @@ -624,7 +624,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertModuleGroupPath("module (1)", "project2 and modules"); } - public void testLanguageLevel() throws Exception { + public void testLanguageLevel() { importProject("test" + "project" + "1" + @@ -645,7 +645,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertEquals(LanguageLevel.JDK_1_4, getLanguageLevelForModule()); } - public void testLanguageLevelFromDefaultCompileExecutionConfiguration() throws Exception { + public void testLanguageLevelFromDefaultCompileExecutionConfiguration() { importProject("test" + "project" + "1" + @@ -671,7 +671,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertEquals(LanguageLevel.JDK_1_8, getLanguageLevelForModule()); } - public void testLanguageLevel6() throws Exception { + public void testLanguageLevel6() { importProject("test" + "project" + "1" + @@ -692,7 +692,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertEquals(LanguageLevel.JDK_1_6, getLanguageLevelForModule()); } - public void testLanguageLevelWhenCompilerPluginIsNotSpecified() throws Exception { + public void testLanguageLevelWhenCompilerPluginIsNotSpecified() { importProject("test" + "project" + "1"); @@ -701,7 +701,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertEquals(LanguageLevel.JDK_1_5, getLanguageLevelForModule()); } - public void testLanguageLevelWhenConfigurationIsNotSpecified() throws Exception { + public void testLanguageLevelWhenConfigurationIsNotSpecified() { importProject("test" + "project" + "1" + @@ -719,7 +719,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertEquals(LanguageLevel.JDK_1_5, getLanguageLevelForModule()); } - public void testLanguageLevelWhenSourceLanguageLevelIsNotSpecified() throws Exception { + public void testLanguageLevelWhenSourceLanguageLevelIsNotSpecified() { importProject("test" + "project" + "1" + @@ -739,7 +739,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertEquals(LanguageLevel.JDK_1_5, getLanguageLevelForModule()); } - public void testLanguageLevelFromPluginManagementSection() throws Exception { + public void testLanguageLevelFromPluginManagementSection() { importProject("test" + "project" + "1" + @@ -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", "test" + "parent" + @@ -798,7 +798,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertEquals(LanguageLevel.JDK_1_4, getLanguageLevelForModule()); } - public void testOverridingLanguageLevelFromPluginManagementSection() throws Exception { + public void testOverridingLanguageLevelFromPluginManagementSection() { importProject("test" + "project" + "1" + @@ -830,7 +830,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertEquals(LanguageLevel.JDK_1_3, getLanguageLevelForModule()); } - public void testInheritingLanguageLevelFromPluginManagementSection() throws Exception { + public void testInheritingLanguageLevelFromPluginManagementSection() { importProject("test" + "project" + "1" + @@ -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("test" + @@ -893,7 +893,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertEquals("1.3", targetLevel); } - public void testSettingTargetLevelFromDefaultCompileExecutionConfiguration() throws Exception { + public void testSettingTargetLevelFromDefaultCompileExecutionConfiguration() { importProject("test" + "project" + "1" + @@ -921,7 +921,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertEquals("1.9", targetLevel); } - public void testSettingTargetLevelFromParent() throws Exception { + public void testSettingTargetLevelFromParent() { createProjectPom("test" + "project" + "pom" + @@ -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("test" + "project" + "1" + @@ -991,7 +991,7 @@ public class StructureImportingTest extends MavenImportingTestCase { assertModules("project"); } - public void testProjectWithInvalidBuildExtension() throws Exception { + public void testProjectWithInvalidBuildExtension() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -1149,7 +1149,7 @@ public class StructureImportingTest extends MavenImportingTestCase { ignore(); // not supported by 2.2 } - public void testProjectWithProfilesXmlWithNewRootTagFile() throws Exception { + public void testProjectWithProfilesXmlWithNewRootTagFile() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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(); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/WorkingWithOpenProjectTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/WorkingWithOpenProjectTest.java index b90c2ef6dda3..6e8e64779162 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/WorkingWithOpenProjectTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/WorkingWithOpenProjectTest.java @@ -35,7 +35,7 @@ public class WorkingWithOpenProjectTest extends MavenImportingTestCase { "1"); } - public void testShouldNotFailOnNewEmptyPomCreation() throws Exception { + public void testShouldNotFailOnNewEmptyPomCreation() { createModulePom("module", ""); // should not throw an exception } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenProjectIndicesManagerTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenProjectIndicesManagerTest.java index 1fbdfd0eff9c..5110345deba1 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenProjectIndicesManagerTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenProjectIndicesManagerTest.java @@ -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("test" + "project" + "1"); @@ -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()); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorTest.java index d563a3de08af..be74b4f0fb51 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigatorTest.java @@ -46,7 +46,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase { super.tearDown(); } - public void testActivation() throws Exception { + public void testActivation() { createProjectPom("test" + "project" + "1" + @@ -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("test" + @@ -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", "test" + @@ -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("test" + @@ -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("test" + @@ -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("test" + @@ -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("test" + @@ -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", "test" + @@ -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("test" + @@ -312,7 +312,7 @@ public class MavenProjectsNavigatorTest extends MavenImportingTestCase { assertEquals(2, getRootNodes().size()); } - public void testNavigatableForProjectNode() throws Exception { + public void testNavigatableForProjectNode() { myProjectsManager.fireActivatedInTests(); createProjectPom("test" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectReaderTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectReaderTest.java index 5f4f1cfb4cab..3b428b7b7eb5 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectReaderTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectReaderTest.java @@ -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("test" + "project" + "1"); @@ -50,7 +50,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("1", p.getVersion()); } - public void testInvalidXml() throws Exception { + public void testInvalidXml() { createProjectPom("test" + "project" + "1"); @@ -73,7 +73,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("1", p.getVersion()); } - public void testInvalidXmlCharData() throws Exception { + public void testInvalidXmlCharData() { createProjectPom("test" + "project" + "1"); @@ -89,7 +89,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("a0x0a", p.getName()); } - public void testInvalidParentXml() throws Exception { + public void testInvalidParentXml() { createProjectPom("test" + "parent" + "1" + @@ -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("" + " test" + " parent" + @@ -114,7 +114,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertProblems(readProject(myProjectPom, new NullProjectLocator())); } - public void testProjectWithSelfParentIsInvalid() throws Exception { + public void testProjectWithSelfParentIsInvalid() { createProjectPom("" + " test" + " project" + @@ -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("test" + "project" + "1"); @@ -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("test" + "project" + "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("test" + @@ -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("foo bar"); MavenModel p = readProject(myProjectPom); assertEquals("foo bar", p.getName()); } - public void testNewLines() throws Exception { + public void testNewLines() { createProjectPom("\n" + " group\n" + "\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("test\n" + "" + "\n" + @@ -232,7 +232,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertNull(p.getName()); } - public void testTextInContainerTag() throws Exception { + public void testTextInContainerTag() { createProjectPom("foo 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("test" + "project" + "1" + @@ -290,7 +290,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertParent(p, "Unknown", "Unknown", "Unknown"); } - public void testTakingCoordinatesFromParent() throws Exception { + public void testTakingCoordinatesFromParent() { createProjectPom("" + " test" + " project" + @@ -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("test" + "project" + "1" + @@ -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("" + " " + " " + @@ -413,7 +413,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals(0, p.getBuild().getTestResources().size()); } - public void testPathsWithProperties() throws Exception { + public void testPathsWithProperties() { createProjectPom("" + " subDir" + " " + @@ -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("" + " value1" + " value2" + @@ -473,7 +473,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("value2", p.getPackaging()); } - public void testExpandingPropertiesRecursively() throws Exception { + public void testExpandingPropertiesRecursively() { createProjectPom("" + " value1" + " ${prop1}2" + @@ -487,7 +487,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("value12", p.getPackaging()); } - public void testHandlingRecursiveProperties() throws Exception { + public void testHandlingRecursiveProperties() { createProjectPom("" + " ${prop2}" + " ${prop1}" + @@ -536,7 +536,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertProblems(readResult); } - public void testDoNotGoIntoRecursionWhenTryingToResolveParentInDefaultPath() throws Exception { + public void testDoNotGoIntoRecursionWhenTryingToResolveParentInDefaultPath() { VirtualFile child = createModulePom("child", "test" + "child" + @@ -563,7 +563,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertProblems(readResult); } - public void testExpandingSystemAndEnvProperties() throws Exception { + public void testExpandingSystemAndEnvProperties() { createProjectPom("${java.home}" + "${env." + getEnvVar() + "}"); @@ -572,7 +572,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals(System.getenv(getEnvVar()), p.getPackaging()); } - public void testExpandingPropertiesFromProfiles() throws Exception { + public void testExpandingPropertiesFromProfiles() { createProjectPom("${prop1}" + "${prop2}" + @@ -599,7 +599,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("${prop2}", p.getPackaging()); } - public void testExpandingPropertiesFromManuallyActivatedProfiles() throws Exception { + public void testExpandingPropertiesFromManuallyActivatedProfiles() { createProjectPom("${prop1}" + "${prop2}" + @@ -626,7 +626,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("value2", p.getPackaging()); } - public void testExpandingPropertiesFromParent() throws Exception { + public void testExpandingPropertiesFromParent() { createProjectPom("test" + "parent" + "1" + @@ -647,7 +647,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("value", p.getName()); } - public void testDoNotExpandPropertiesFromParentWithWrongCoordinates() throws Exception { + public void testDoNotExpandPropertiesFromParentWithWrongCoordinates() { createProjectPom("test" + "parent" + "1" + @@ -690,7 +690,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("value", p.getName()); } - public void testExpandingPropertiesFromIndirectParent() throws Exception { + public void testExpandingPropertiesFromIndirectParent() { createProjectPom("test" + "parent" + "1" + @@ -722,7 +722,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("value", p.getName()); } - public void testExpandingPropertiesFromParentInSpecifiedLocation() throws Exception { + public void testExpandingPropertiesFromParentInSpecifiedLocation() { createModulePom("parent", "test" + "parent" + @@ -745,7 +745,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("value", p.getName()); } - public void testExpandingPropertiesFromParentInSpecifiedLocationWithoutFile() throws Exception { + public void testExpandingPropertiesFromParentInSpecifiedLocationWithoutFile() { createModulePom("parent", "test" + "parent" + @@ -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", "test" + "parent" + @@ -821,7 +821,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("value", p.getName()); } - public void testPropertiesFromParentInParentSection() throws Exception { + public void testPropertiesFromParentInParentSection() { createProjectPom("${groupProp}" + "parent" + "${versionProp}" + @@ -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("test" + "parent" + "1" + @@ -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("test" + "parent" + "1" + @@ -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("test" + "parent" + "1" + @@ -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("${prop}"); createProfilesXmlOldStyle("" + " one" + @@ -929,7 +929,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("foo", mavenProject.getName()); } - public void testPropertiesFromProfilesXmlNewStyle() throws Exception { + public void testPropertiesFromProfilesXmlNewStyle() { createProjectPom("${prop}"); createProfilesXml("" + " one" + @@ -963,7 +963,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("foo", mavenProject.getName()); } - public void testDoNoInheritParentFinalNameIfUnspecified() throws Exception { + public void testDoNoInheritParentFinalNameIfUnspecified() { createProjectPom("test" + "parent" + "1"); @@ -983,7 +983,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertEquals("module-2", p.getBuild().getFinalName()); } - public void testDoInheritingParentFinalNameIfSpecified() throws Exception { + public void testDoInheritingParentFinalNameIfSpecified() { createProjectPom("test" + "parent" + "1" + @@ -1008,7 +1008,7 @@ public class MavenProjectReaderTest extends MavenTestCase { } - public void testInheritingParentProfiles() throws Exception { + public void testInheritingParentProfiles() { createProjectPom("test" + "parent" + "1" + @@ -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("test" + "project" + "1" + @@ -1173,7 +1173,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertSize(0, readProject(m, "one").getModules()); } - public void testActivatingProfilesByDefault() throws Exception { + public void testActivatingProfilesByDefault() { createProjectPom("" + " " + " one" + @@ -1192,7 +1192,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertActiveProfiles("one"); } - public void testActivatingProfilesAfterResolvingInheritance() throws Exception { + public void testActivatingProfilesAfterResolvingInheritance() { createModulePom("parent", "test" + "parent" + @@ -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("" + @@ -1238,7 +1238,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertActiveProfiles("one"); } - public void testActivatingProfilesByJdk() throws Exception { + public void testActivatingProfilesByJdk() { createProjectPom("" + " " + " one" + @@ -1257,7 +1257,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertActiveProfiles("one"); } - public void testActivatingProfilesByStrictJdkVersion() throws Exception { + public void testActivatingProfilesByStrictJdkVersion() { createProjectPom("" + " " + " one" + @@ -1270,7 +1270,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertActiveProfiles(); } - public void testActivatingProfilesByProperty() throws Exception { + public void testActivatingProfilesByProperty() { createProjectPom("" + " " + " one" + @@ -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("" + @@ -1347,7 +1347,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertActiveProfiles("one"); } - public void testActivateDefaultProfileEventIfThereAreExplicitOnesButAbsent() throws Exception { + public void testActivateDefaultProfileEventIfThereAreExplicitOnesButAbsent() { createProjectPom("" + " " + " default" + @@ -1363,7 +1363,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertActiveProfiles(Arrays.asList("foofoofoo"), "default"); } - public void testDoNotActivateDefaultProfileIfThereAreActivatedImplicit() throws Exception { + public void testDoNotActivateDefaultProfileIfThereAreActivatedImplicit() { createProjectPom("" + " " + " default" + @@ -1382,7 +1382,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertActiveProfiles("implicit"); } - public void testActivatingImplicitProfilesEventWhenThereAreExplicitOnes() throws Exception { + public void testActivatingImplicitProfilesEventWhenThereAreExplicitOnes() { createProjectPom("" + " " + " explicit" + @@ -1416,7 +1416,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertActiveProfiles(Arrays.asList("explicit"), "explicit", "settings"); } - public void testAlwaysActivatingActiveProfilesInProfilesXml() throws Exception { + public void testAlwaysActivatingActiveProfilesInProfilesXml() { createFullProfilesXml("" + "" + " " + @@ -1499,7 +1499,7 @@ public class MavenProjectReaderTest extends MavenTestCase { assertActiveProfiles("default", "settings"); } - public void testActivateDefaultProfilesWhenThereAreActiveProfilesInProfilesXml() throws Exception { + public void testActivateDefaultProfilesWhenThereAreActiveProfilesInProfilesXml() { createFullProfilesXml("" + "" + " " + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenFoldersImporterTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenFoldersImporterTest.java index 0ecdfe20a0a2..316d8fe5f50d 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenFoldersImporterTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenFoldersImporterTest.java @@ -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("test" + "project" + "1"); @@ -50,7 +49,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase { assertNull(myProjectRoot.findChild("target")); } - public void testIgnoreTargetFolder() throws Exception { + public void testIgnoreTargetFolder() { importProject("test" + "project" + "1"); @@ -67,7 +66,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase { } } - public void testUpdatingFoldersForAllTheProjects() throws Exception { + public void testUpdatingFoldersForAllTheProjects() { createProjectPom("test" + "project" + "pom" + @@ -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("test" + "project" + @@ -126,7 +125,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase { assertTestResources("project", "src/test/resources"); } - public void testDoesNotExcludeRegisteredSources() throws Exception { + public void testDoesNotExcludeRegisteredSources() { importProject("test" + "project" + "1"); @@ -150,7 +149,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase { assertExcludes("project", "target"); } - public void testDoesNothingWithNonMavenModules() throws Exception { + public void testDoesNothingWithNonMavenModules() { importProject("test" + "project" + "1"); @@ -159,7 +158,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase { updateProjectFolders(); // shouldn't throw exceptions } - public void testDoNotUpdateOutputFoldersWhenUpdatingExcludedFolders() throws Exception { + public void testDoNotUpdateOutputFoldersWhenUpdatingExcludedFolders() { importProject("test" + "project" + "1"); @@ -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("test" + "project" + "1"); @@ -200,7 +199,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase { assertEquals(0, count[0]); } - public void testCommitOnlyOnceForAllModules() throws Exception { + public void testCommitOnlyOnceForAllModules() { createProjectPom("test" + "project" + "pom" + @@ -240,7 +239,7 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase { assertEquals(1, count[0]); } - public void testMarkSourcesAsGeneratedOnReImport() throws IOException { + public void testMarkSourcesAsGeneratedOnReImport() { importProject("test" + "project" + "1"); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectTest.java index 1108f12c6d65..55d0dd9483e5 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectTest.java @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -226,7 +226,7 @@ public class MavenProjectTest extends MavenImportingTestCase { assertNull(findPlugin("group2", "id2")); } - public void testFindingDefaultPlugin() throws Exception { + public void testFindingDefaultPlugin() { importProject("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -373,7 +373,7 @@ public class MavenProjectTest extends MavenImportingTestCase { assertEquals("somePath", findPluginConfig("group", "id", "one")); } - public void testPluginConfigurationWithStandardVariable() throws Exception { + public void testPluginConfigurationWithStandardVariable() { importProject("test" + "project" + "1" + @@ -395,7 +395,7 @@ public class MavenProjectTest extends MavenImportingTestCase { FileUtil.toSystemIndependentName(findPluginConfig("group", "id", "one"))); } - public void testPluginConfigurationWithColons() throws Exception { + public void testPluginConfigurationWithColons() { importProject("test" + "project" + "1" + @@ -415,7 +415,7 @@ public class MavenProjectTest extends MavenImportingTestCase { assertNull(findPluginConfig("group", "id", "two:three")); } - public void testMergingPluginConfigurationFromBuildAndProfiles() throws Exception { + public void testMergingPluginConfigurationFromBuildAndProfiles() { createProjectPom("test" + "project" + "1" + @@ -470,7 +470,7 @@ public class MavenProjectTest extends MavenImportingTestCase { assertEquals("true", plugin.getConfigurationElement().getChildText("debug")); } - public void testCompilerPluginConfigurationFromProperties() throws Exception { + public void testCompilerPluginConfigurationFromProperties() { createProjectPom("test" + "project" + "1" + @@ -487,7 +487,7 @@ public class MavenProjectTest extends MavenImportingTestCase { assertEquals("1.7", getMavenProject().getTargetLevel()); } - public void testCompilerPluginConfigurationFromPropertiesOverride() throws Exception { + public void testCompilerPluginConfigurationFromPropertiesOverride() { createProjectPom("test" + "project" + "1" + @@ -517,7 +517,7 @@ public class MavenProjectTest extends MavenImportingTestCase { assertEquals("1.4", getMavenProject().getTargetLevel()); } - public void testMergingPluginConfigurationFromBuildProfilesAndPluginsManagement() throws Exception { + public void testMergingPluginConfigurationFromBuildProfilesAndPluginsManagement() { createProjectPom("test" + "project" + "1" + @@ -569,7 +569,7 @@ public class MavenProjectTest extends MavenImportingTestCase { assertEquals("true", plugin.getConfigurationElement().getChildText("debug")); } - public void testDoesNotCollectProfilesWithoutId() throws Exception { + public void testDoesNotCollectProfilesWithoutId() { importProject("test" + "project" + "1" + @@ -585,7 +585,7 @@ public class MavenProjectTest extends MavenImportingTestCase { assertOrderedElementsAreEqual(getMavenProject().getProfilesIds(), "one"); } - public void testCollectingRepositories() throws Exception { + public void testCollectingRepositories() { importProject("test" + "project" + "1" + @@ -608,7 +608,7 @@ public class MavenProjectTest extends MavenImportingTestCase { assertEquals("central", result.get(2).getId()); } - public void testOverridingCentralRepository() throws Exception { + public void testOverridingCentralRepository() { importProject("test" + "project" + "1" + @@ -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", "test" + "p1" + @@ -670,7 +670,7 @@ public class MavenProjectTest extends MavenImportingTestCase { assertEquals("central", result.get(2).getId()); } - public void testMavenModelMap() throws Exception { + public void testMavenModelMap() { importProject("test" + "project" + "1" + @@ -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", "test" + "m1" + @@ -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", "test" + "m1" + @@ -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", "test" + "m1" + @@ -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", "test" + "m1" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectsManagerTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectsManagerTest.java index 5c43b33fdb9e..f35c4cf1b7ae 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectsManagerTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectsManagerTest.java @@ -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("test" + @@ -58,7 +57,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase { assertNull(myProjectsManager.findProject(myProjectPom)); } - public void testUpdatingProjectsWhenAbsentManagedProjectFileAppears() throws Exception { + public void testUpdatingProjectsWhenAbsentManagedProjectFileAppears() { importProject("test" + "parent" + "1" + @@ -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", "test" + "project1" + @@ -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", "test" + "project1" + @@ -157,7 +156,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase { assertEquals(2, myProjectsTree.getRootProjects().size()); } - public void testUpdatingProjectsWhenMovingModuleFile() throws Exception { + public void testUpdatingProjectsWhenMovingModuleFile() { createProjectPom("test" + "parent" + "1" + @@ -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("test" + "parent" + "1" + @@ -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", "test" + "m1" + @@ -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", "test" + "m1" + @@ -291,7 +290,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase { assertModules("m1"); } - public void testAddingManagedFileAndChangingAggregation() throws Exception { + public void testAddingManagedFileAndChangingAggregation() { importProject("test" + "parent" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "pom" + @@ -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("test" + "project" + "1" + @@ -750,7 +749,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase { assertModules("project"); } - public void testSchedulingResolveOfDependentProjectWhenDependencyChanges() throws Exception { + public void testSchedulingResolveOfDependentProjectWhenDependencyChanges() { createProjectPom("test" + "project" + "pom" + @@ -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("test" + "project" + "pom" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -1008,7 +1007,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase { assertTrue(myProjectsManager.hasScheduledImportsInTests()); } - public void testScheduleReimportWhenPluginConfigurationChangesInValue() throws Exception { + public void testScheduleReimportWhenPluginConfigurationChangesInValue() { importProject("test" + "project" + "1" + @@ -1050,7 +1049,7 @@ public class MavenProjectsManagerTest extends MavenImportingTestCase { assertTrue(myProjectsManager.hasScheduledImportsInTests()); } - public void testIgnoringProjectsForDeletedModules() throws Exception { + public void testIgnoringProjectsForDeletedModules() { createProjectPom("test" + "project" + "1" + @@ -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("test" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectsTreeReadingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectsTreeReadingTest.java index 5cb4f020e02b..04be2d829c28 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectsTreeReadingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/importing/MavenProjectsTreeReadingTest.java @@ -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", "test" + "m1" + @@ -56,7 +56,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { assertEquals(m2, roots.get(1).getFile()); } - public void testModulesWithWhiteSpaces() throws Exception { + public void testModulesWithWhiteSpaces() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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: ", 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: ", listener.log); } - public void testSameProjectAsModuleOfSeveralProjects() throws Exception { + public void testSameProjectAsModuleOfSeveralProjects() { VirtualFile p1 = createModulePom("project1", "test" + "project1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -321,7 +321,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { assertEquals("updated: project m2 deleted: ", listener.log); } - public void testUpdatingWholeModel() throws Exception { + public void testUpdatingWholeModel() { createProjectPom("test" + "project" + "1" + @@ -373,7 +373,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { assertEquals("m1", childNode1.getMavenId().getArtifactId()); } - public void testForceUpdatingWholeModel() throws Exception { + public void testForceUpdatingWholeModel() { createProjectPom("test" + "project" + "1" + @@ -403,7 +403,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { assertEquals("updated: project m deleted: ", l.log); } - public void testForceUpdatingSingleProject() throws Exception { + public void testForceUpdatingSingleProject() { createProjectPom("test" + "project" + "1" + @@ -434,7 +434,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { l.log = ""; } - public void testUpdatingModelWithNewProfiles() throws Exception { + public void testUpdatingModelWithNewProfiles() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -511,7 +511,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { assertEquals("m1", n.getMavenId().getArtifactId()); } - public void testUpdatingInheritance() throws Exception { + public void testUpdatingInheritance() { createProjectPom("test" + "parent" + "1" + @@ -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("test" + "parent" + "1" + @@ -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: resolved: parent plugins: parent folders: parent ", listener.log); } - public void testAddingInheritanceParent() throws Exception { + public void testAddingInheritanceParent() { VirtualFile child = createModulePom("child", "test" + "${childName}" + @@ -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", "test" + "parent" + @@ -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("test" + "parent" + "1" + @@ -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("test" + "parent" + "1" + @@ -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", "test" + "parent1" + @@ -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("test" + "parent" + "1" + @@ -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("test" + "parent" + "1" + @@ -929,7 +929,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { updateAll(myProjectPom); // shouldn't hang } - public void testHandlingRecursiveInheritance() throws Exception { + public void testHandlingRecursiveInheritance() { createProjectPom("test" + "parent" + "1" + @@ -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", "test" + "parent" + @@ -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("test" + "parent" + "1" + @@ -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("test" + "parent" + "1" + @@ -1060,7 +1060,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { updateAll(child); // should not recurse } - public void testUpdatingAddsModules() throws Exception { + public void testUpdatingAddsModules() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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", "test" + "m" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -1434,7 +1434,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { assertEquals("updated: deleted: m2 m1 ", listener.log); } - public void testReconnectModuleOfDeletedProjectIfModuleIsManaged() throws Exception { + public void testReconnectModuleOfDeletedProjectIfModuleIsManaged() { createProjectPom("test" + "project" + "1" + @@ -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", "test" + "m1" + @@ -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", "test" + "m1" + @@ -1521,7 +1521,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { assertEquals(2, myTree.getRootProjects().size()); } - public void testSendingNotificationsWhenAddingOrDeletingManagedFiles() throws Exception { + public void testSendingNotificationsWhenAddingOrDeletingManagedFiles() { createProjectPom("test" + "parent" + "1" + @@ -1556,7 +1556,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { assertEquals("updated: deleted: m1 m2 parent ", l.log); } - public void testUpdatingModelWhenActiveProfilesChange() throws Exception { + public void testUpdatingModelWhenActiveProfilesChange() { createProjectPom("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -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", "test" + "parent" + @@ -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("test" + "project" + "1" + @@ -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("test" + "project" + "1" + @@ -2061,7 +2061,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { "settings"); } - public void testDeletingAndRestoringActiveProfilesWhenAvailableProfilesChange() throws Exception { + public void testDeletingAndRestoringActiveProfilesWhenAvailableProfilesChange() { createProjectPom("test" + "project" + "1" + @@ -2107,7 +2107,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { assertUnorderedElementsAreEqual(myTree.getExplicitProfiles().getEnabledProfiles(), "one", "two"); } - public void testDeletingAndRestoringActiveProfilesWhenProjectDeletes() throws Exception { + public void testDeletingAndRestoringActiveProfilesWhenProjectDeletes() { createProjectPom("test" + "project" + "1" + @@ -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", "test" + "project1" + "1" + diff --git a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltResolveTest.java b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltResolveTest.java index 1c036a0d758f..94e9435b0747 100644 --- a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltResolveTest.java +++ b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltResolveTest.java @@ -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);