mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] naming conventions: update default test name pattern (IDEA-279616)
GitOrigin-RevId: 55c6d0aede394c091693c6b0acec8852498b4581
This commit is contained in:
committed by
intellij-monorepo-bot
parent
29e78b0f80
commit
0010825b50
@@ -34,7 +34,7 @@ public class TestClassNamingConvention extends NamingConvention<PsiClass> {
|
||||
|
||||
@Override
|
||||
public NamingConventionBean createDefaultBean() {
|
||||
return new NamingConventionBean("[A-Z][A-Za-z\\d]*Test(s|Case)?|Test[A-Z][A-Za-z\\d]*", DEFAULT_MIN_LENGTH, DEFAULT_MAX_LENGTH);
|
||||
return new NamingConventionBean("[A-Z][A-Za-z\\d]*Test(s|Case)?|Test[A-Z][A-Za-z\\d]*|IT(.*)|(.*)IT(Case)?", DEFAULT_MIN_LENGTH, DEFAULT_MAX_LENGTH);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+7
-2
@@ -2,7 +2,7 @@ package com.siyeh.igtest.naming.abstract_class_naming_convention;
|
||||
|
||||
import org.junit.jupiter.api.*;
|
||||
|
||||
class <warning descr="Test name 'WithNested' doesn't match regex '[A-Z][A-Za-z\d]*Test(s|Case)?|Test[A-Z][A-Za-z\d]*'">WithNested</warning> {
|
||||
class <warning descr="Test name 'WithNested' doesn't match regex '[A-Z][A-Za-z\d]*Test(s|Case)?|Test[A-Z][A-Za-z\d]*|IT(.*)|(.*)IT(Case)?'">WithNested</warning> {
|
||||
@Nested
|
||||
class WithParent {
|
||||
@Test
|
||||
@@ -10,7 +10,12 @@ class <warning descr="Test name 'WithNested' doesn't match regex '[A-Z][A-Za-z\d
|
||||
}
|
||||
}
|
||||
|
||||
class <warning descr="Test name 'Normal' doesn't match regex '[A-Z][A-Za-z\d]*Test(s|Case)?|Test[A-Z][A-Za-z\d]*'">Normal</warning> {
|
||||
class <warning descr="Test name 'Normal' doesn't match regex '[A-Z][A-Za-z\d]*Test(s|Case)?|Test[A-Z][A-Za-z\d]*|IT(.*)|(.*)IT(Case)?'">Normal</warning> {
|
||||
@Test
|
||||
public void test1() {}
|
||||
}
|
||||
|
||||
class NormalIT {
|
||||
@Test
|
||||
public void test1() {}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import junit.framework.TestCase
|
||||
class SpecialGoodTest extends TestCase {
|
||||
class MyVeryInner extends SpecialGoodTest {}
|
||||
}
|
||||
class <warning descr="Test name 'SpecialBad' doesn't match regex '[A-Z][A-Za-z\d]*Test(s|Case)?|Test[A-Z][A-Za-z\d]*'">SpecialBad</warning> extends TestCase { }
|
||||
class <warning descr="Test name 'SpecialBad' doesn't match regex '[A-Z][A-Za-z\d]*Test(s|Case)?|Test[A-Z][A-Za-z\d]*|IT(.*)|(.*)IT(Case)?'">SpecialBad</warning> extends TestCase { }
|
||||
class TestInTheBeginning extends TestCase { }
|
||||
class WithTests extends TestCase { }
|
||||
class WithTestCase extends TestCase { }
|
||||
|
||||
Reference in New Issue
Block a user