Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAEL-1196: jUnit @Test Annotation #3184

Merged

Conversation

aurasphere
Copy link
Contributor

No description provided.

Copy link
Collaborator

@KevinGilmore KevinGilmore left a comment

Choose a reason for hiding this comment

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

Rename unit test class and the test methods as per comments.

* @author Donato Rimenti
*
*/
public class NumbersBeanTest {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's rename the test class as per convention: NumbersBeanUnitTest

* Tests that when an even number is passed to
* {@link NumbersBean#isNumberEven(int)}, true is returned.
*/
@Test
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better test names, using the givenX_whenY_thenZ formula, would be:
givenEvenNumber_whenCheckingIsNumberEven_thenTrue
givenOddNumber_whenCheckingIsNumberEven_thenFalse

@KevinGilmore KevinGilmore merged commit 1a7e85c into eugenp:master Dec 7, 2017
tarangbhalodia pushed a commit to tarangbhalodia/tutorials that referenced this pull request Jan 2, 2018
* BAEL-1196: jUnit @test Annotation

* Fixed tests names as suggested.

* Reduced visibility on test methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants