use of com.intellij.codeInspection.java18StreamApi.StaticPseudoFunctionalStyleMethodInspection in project intellij-community by JetBrains.
the class StaticPseudoFunctionalStyleMethodTest method doTest.
private void doTest() {
myFixture.configureByFile(getTestName(true) + "/test.java");
myFixture.enableInspections(new StaticPseudoFunctionalStyleMethodInspection());
boolean isQuickFixFound = false;
for (IntentionAction action : myFixture.getAvailableIntentions()) {
if (action instanceof QuickFixWrapper) {
final LocalQuickFix fix = ((QuickFixWrapper) action).getFix();
if (fix instanceof StaticPseudoFunctionalStyleMethodInspection.ReplacePseudoLambdaWithLambda) {
myFixture.launchAction(action);
isQuickFixFound = true;
break;
}
}
}
assertTrue("Quick fix isn't found", isQuickFixFound);
myFixture.checkResultByFile(getTestName(true) + "/test_after.java");
}
Aggregations