Skip to content

Conversation

akarnokd
Copy link
Member

Move into TestUtil.checkUtilityClass().

@akarnokd akarnokd added the Test label Jun 27, 2016
@codecov-io
Copy link

Current coverage is 81.25%

Merging #4133 into 1.x will decrease coverage by 0.04%

@@                1.x      #4133   diff @@
==========================================
  Files           257        257          
  Lines         16811      16811          
  Methods           0          0          
  Messages          0          0          
  Branches       2547       2547          
==========================================
- Hits          13666      13659     -7   
- Misses         2243       2245     +2   
- Partials        902        907     +5   

Powered by Codecov. Last updated by 5c74757...c568e9d

@vanniktech
Copy link
Collaborator

👍

/**
* Common test utility methods.
*/
public enum TestUtil {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious - why use an enum here instead of a class? Is it just to forbid inheritance?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly - but not my invention. I saw this in the JDK source and in fact, saves you testing a private constructor. However, we can't expose such enums through the public API so only some internal tools are defined this way.

@akarnokd
Copy link
Member Author

/cc @davidmoten

@davidmoten
Copy link
Collaborator

👍

@akarnokd akarnokd merged commit 5439901 into ReactiveX:1.x Jun 27, 2016
@akarnokd akarnokd deleted the PrivateCheckerUtil branch June 27, 2016 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants