diff options
Diffstat (limited to 'plugins/IntentionPowerPak/testSrc/com')
9 files changed, 173 insertions, 0 deletions
diff --git a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/DetailExceptionsIntentionTest.java b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/DetailExceptionsIntentionTest.java index 57dd548f5d15..4aa2832b772f 100644 --- a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/DetailExceptionsIntentionTest.java +++ b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/DetailExceptionsIntentionTest.java @@ -4,6 +4,7 @@ import com.siyeh.IntentionPowerPackBundle; import com.siyeh.ipp.IPPTestCase; /** + * @see DetailExceptionsIntention * @author Bas Leijdekkers */ public class DetailExceptionsIntentionTest extends IPPTestCase { @@ -12,6 +13,7 @@ public class DetailExceptionsIntentionTest extends IPPTestCase { public void testSimple() { doTest(); } public void testForeach() { doTest(); } public void testTryWithResources() { doTest(); } + public void testPolyadicParentheses() { doTest(); } @Override protected String getIntentionName() { diff --git a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitMultiCatchIntentionTest.java b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitMultiCatchIntentionTest.java new file mode 100644 index 000000000000..360ea156ba14 --- /dev/null +++ b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitMultiCatchIntentionTest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2000-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.siyeh.ipp.exceptions; + +import com.siyeh.IntentionPowerPackBundle; +import com.siyeh.ipp.IPPTestCase; + +public class SplitMultiCatchIntentionTest extends IPPTestCase { + public void testSimple() { doTest(); } + public void testTypeAnno() { doTest(); } + + @Override + protected String getIntentionName() { + return IntentionPowerPackBundle.message("split.multi.catch.intention.name"); + } + + @Override + protected String getRelativePath() { + return "exceptions/splitMultiCatch"; + } +} diff --git a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitTryWithMultipleResourcesIntentionTest.java b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitTryWithMultipleResourcesIntentionTest.java index cce64b4edcd8..61a1fa54a6b2 100644 --- a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitTryWithMultipleResourcesIntentionTest.java +++ b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitTryWithMultipleResourcesIntentionTest.java @@ -9,6 +9,7 @@ import com.siyeh.ipp.IPPTestCase; public class SplitTryWithMultipleResourcesIntentionTest extends IPPTestCase { public void testSimple() { doTest(); } + public void testWithCatch() { doTest(); } @Override protected String getIntentionName() { diff --git a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/expression/FlipExpressionIntentionTest.java b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/expression/FlipExpressionIntentionTest.java new file mode 100644 index 000000000000..e1ec6b467380 --- /dev/null +++ b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/expression/FlipExpressionIntentionTest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2000-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.siyeh.ipp.expression; + +import com.siyeh.IntentionPowerPackBundle; +import com.siyeh.ipp.IPPTestCase; + +/** + * @see com.siyeh.ipp.expression.FlipExpressionIntention + */ +public class FlipExpressionIntentionTest extends IPPTestCase { + public void testPrefix() { doTest(); } + public void testPolyadic() { doTest(); } + public void testNoChange() { assertIntentionNotAvailable(); } + public void testNoException() { assertIntentionNotAvailable(); } + + @Override + protected String getIntentionName() { + return IntentionPowerPackBundle.message("flip.smth.intention.name1", "-"); + } + + @Override + protected String getRelativePath() { + return "expression/flip_expression"; + } +} diff --git a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/opassign/ReplaceOperatorAssignmentWithAssignmentIntentionTest.java b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/opassign/ReplaceOperatorAssignmentWithAssignmentIntentionTest.java index d3decdebc342..026351e96ddf 100644 --- a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/opassign/ReplaceOperatorAssignmentWithAssignmentIntentionTest.java +++ b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/opassign/ReplaceOperatorAssignmentWithAssignmentIntentionTest.java @@ -3,12 +3,16 @@ package com.siyeh.ipp.opassign; import com.siyeh.IntentionPowerPackBundle; import com.siyeh.ipp.IPPTestCase; +/** + * @see ReplaceOperatorAssignmentWithAssignmentIntention + */ public class ReplaceOperatorAssignmentWithAssignmentIntentionTest extends IPPTestCase { public void testOperatorAssignment1() { doTest(); } public void testDoubleOpAssign() { doTest(); } public void testStringOpAssign() { doTest(); } public void testByteOpAssign() { doTest(); } public void testPrecedence() { doTest(); } + public void testPolyadicAssignment() { doTest(IntentionPowerPackBundle.message("replace.operator.assignment.with.assignment.intention.name", "*=")); } @Override protected String getIntentionName() { diff --git a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/opassign/ReplaceWithOperatorAssignmentIntentionTest.java b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/opassign/ReplaceWithOperatorAssignmentIntentionTest.java new file mode 100644 index 000000000000..0a109e5af5c4 --- /dev/null +++ b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/opassign/ReplaceWithOperatorAssignmentIntentionTest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2000-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.siyeh.ipp.opassign; + +import com.siyeh.IntentionPowerPackBundle; +import com.siyeh.ipp.IPPTestCase; + +/** + * @see ReplaceWithOperatorAssignmentIntention + */ +public class ReplaceWithOperatorAssignmentIntentionTest extends IPPTestCase { + public void testPolyadicExpression() { doTest(); } + public void testExcluded() { assertIntentionNotAvailable(); } + + @Override + protected String getIntentionName() { + return IntentionPowerPackBundle.message("replace.assignment.with.operator.assignment.intention.name", "+"); + } + + @Override + protected String getRelativePath() { + return "opassign/operator_assignment"; + } +} diff --git a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/parenthesis/UnnecessaryParenthesesIntentionTest.java b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/parenthesis/UnnecessaryParenthesesIntentionTest.java index 720442fc883d..d373c6c46d6c 100644 --- a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/parenthesis/UnnecessaryParenthesesIntentionTest.java +++ b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/parenthesis/UnnecessaryParenthesesIntentionTest.java @@ -17,6 +17,7 @@ public class UnnecessaryParenthesesIntentionTest extends IPPTestCase { public void testNotCommutative2() { doTest(); } public void testArrayInitializer() { doTest(); } public void testArrayAccessExpression() { doTest(); } + public void testArrayAccessExpression2() { doTest(); } public void testSimplePrecedence() { assertIntentionNotAvailable(); } @Override diff --git a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/switchtoif/ReplaceIfWithSwitchlIntentionTest.java b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/switchtoif/ReplaceIfWithSwitchlIntentionTest.java new file mode 100644 index 000000000000..f6692ab4e2c6 --- /dev/null +++ b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/switchtoif/ReplaceIfWithSwitchlIntentionTest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2000-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.siyeh.ipp.switchtoif; + +import com.siyeh.IntentionPowerPackBundle; +import com.siyeh.ipp.IPPTestCase; + +/** + * @see ReplaceIfWithSwitchIntention + */ +public class ReplaceIfWithSwitchlIntentionTest extends IPPTestCase { + + public void testComments() { doTest(); } + public void testLong() { assertIntentionNotAvailable(); } + public void testPolyadic() { doTest(); } + + @Override + protected String getIntentionName() { + return IntentionPowerPackBundle.message("replace.if.with.switch.intention.name"); + } + + @Override + protected String getRelativePath() { + return "switchtoif/replace_if_with_switch"; + } +} diff --git a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/types/ReplaceMethodReferenceWithLambdaIntentionTest.java b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/types/ReplaceMethodReferenceWithLambdaIntentionTest.java index 0a4dc30371f2..650a2d8a5266 100644 --- a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/types/ReplaceMethodReferenceWithLambdaIntentionTest.java +++ b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/types/ReplaceMethodReferenceWithLambdaIntentionTest.java @@ -89,4 +89,20 @@ public class ReplaceMethodReferenceWithLambdaIntentionTest extends IPPTestCase { public void testNewDefaultConstructor() throws Exception { doTest(); } + + public void testArrayConstructorRef() throws Exception { + doTest(); + } + + public void testArrayConstructorRef2Dim() throws Exception { + doTest(); + } + + public void testArrayMethodRef() throws Exception { + doTest(); + } + + public void testArrayConstructorRefUniqueParamName() throws Exception { + doTest(); + } } |