mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
[lombok] AddAbstractAndStaticModifiersFix: use PsiUpdateModCommandAction; better test (IDEA-329939)
GitOrigin-RevId: 8c79904013582ccaf02f69c74bc1c8b18fd76252
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d83f77f3d8
commit
5bcfe1fdef
@@ -14,6 +14,7 @@ import java.util.List;
|
|||||||
public class SuperBuilderQuickFixTest extends AbstractLombokLightCodeInsightTestCase {
|
public class SuperBuilderQuickFixTest extends AbstractLombokLightCodeInsightTestCase {
|
||||||
|
|
||||||
public void testAddModifiersAbstractAndStaticOnInnerBuilderClass() {
|
public void testAddModifiersAbstractAndStaticOnInnerBuilderClass() {
|
||||||
|
myFixture.enableInspections(LombokInspection.class);
|
||||||
@Language("JAVA") final String text = """
|
@Language("JAVA") final String text = """
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
@@ -35,8 +36,28 @@ public class SuperBuilderQuickFixTest extends AbstractLombokLightCodeInsightTest
|
|||||||
}
|
}
|
||||||
""";
|
""";
|
||||||
myFixture.configureByText(JavaFileType.INSTANCE, text);
|
myFixture.configureByText(JavaFileType.INSTANCE, text);
|
||||||
|
IntentionAction action = myFixture.findSingleIntention("Make 'DeltaOfferComponentBuilder' abstract and static");
|
||||||
|
myFixture.launchAction(action);
|
||||||
|
myFixture.checkResult("""
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
assertTrue(hasActionWithText("Make 'DeltaOfferComponentBuilder' abstract and static"));
|
@SuperBuilder
|
||||||
|
class DeltaComponentWithSalesAndTechComponentId {
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuperBuilder
|
||||||
|
public class DeltaOfferComponent extends DeltaComponentWithSalesAndTechComponentId {
|
||||||
|
|
||||||
|
Integer max;
|
||||||
|
|
||||||
|
public abstract static class DeltaOfferComponentBuilder {
|
||||||
|
public DeltaOfferComponentBuilder max(Integer max) {
|
||||||
|
this.max = max;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
""");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAddModifiersAbstractOnInnerBuilderClass() {
|
public void testAddModifiersAbstractOnInnerBuilderClass() {
|
||||||
|
|||||||
Reference in New Issue
Block a user