Package: groovy.org.codenarc.rule.junit

## [Groovy] Class JUnitPublicNonTestMethodRule

- groovy.org.codenarc.rule.junit.JUnitPublicNonTestMethodRule

- Rule that checks if a JUnit test class contains public methods other than:

  - Zero-argument methods with names starting with "test"
  - The setUp() and tearDown() methods
  - Methods annotated with @Test
  - Methods annotated with
    Before:
      and
    @After
  - Methods annotated with
    BeforeClass:
      and
    @AfterClass
  Public, non-test methods on a test class violate conventional usage of test classes, and can be confusing.

  Public, non-test methods may also hide unintentional 'Lost Tests'. For instance, the test method declaration may accidentally include methods parameters, and thus be ignored by JUnit. Or the method may accidentally not follow the "test.." naming convention and not have the
  Test:
    annotation, and thus be ignored by JUnit.

    This rule sets the default value of the <applyToClassNames> property to only match class names ending in 'Test', 'Tests' or 'TestCase'.
  Authors:
    Chris Mair
    Hamlet D'Arcy

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `String` | `applyToClassNames`
    `Class` | `astVisitorClass`
    `String` | `name`
    `int` | `priority`

- - ### Property Detail

    - #### String applyToClassNames

    - #### Class astVisitorClass

    - #### String name

    - #### int priority