You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alex D Herbert (JIRA)" <ji...@apache.org> on 2019/07/09 15:28:00 UTC

[jira] [Commented] (NUMBERS-130) Test classes and methods can be package-private

    [ https://issues.apache.org/jira/browse/NUMBERS-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16881316#comment-16881316 ] 

Alex D Herbert commented on NUMBERS-130:
----------------------------------------

I don't understand why this matters since the test classes are not released artifacts.

At least leaving them public distinguishes them from anything that may be package private as a helper method for testing and allows for quick scan over the methods of a test class in an IDE which: 
 * Colours public methods differently to package private ones
 * Allows for hiding all non public methods
 * Adds any other public vs non-public functionality

> Test classes and methods can be package-private
> -----------------------------------------------
>
>                 Key: NUMBERS-130
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-130
>             Project: Commons Numbers
>          Issue Type: Improvement
>    Affects Versions: 1.0
>            Reporter: Heinrich Bohne
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> With JUnit 5, test classes and methods don't need to be {{public}}, unlike with JUnit 4. It suffices if they are package-private.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)