Skip to content

Conversation

@Pankraz76
Copy link
Contributor

@Pankraz76 Pankraz76 commented May 11, 2025

@Pankraz76 Pankraz76 changed the title JUnit Jupiter best practices [POC] JUnit Jupiter best practices May 11, 2025
Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

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

I strongly prefer to prefix method names with "test". method names are verbs that describe what the method does. That's the best practice to follow. A method that tests foo should be named testFoo, not foo.

@Pankraz76
Copy link
Contributor Author

yes everyone has some opinion.
Thats the reason for best practice, not having to discuss every detail over and over again.

This idea(l) is known as https://en.wikipedia.org/wiki/Convention_over_configuration

As the whole world is probably following, its hart to outsmart them.

@Pankraz76
Copy link
Contributor Author

Pankraz76 commented May 13, 2025

I strongly prefer to prefix method names with "test". method names are verbs that describe what the method does. That's the best practice to follow. A method that tests foo should be named testFoo, not foo.

being outdated is no problem, it will catch us all. Its only a problem when not evolving therefore leaving behind, missing out.

image

@Pankraz76
Copy link
Contributor Author

Pankraz76 commented May 13, 2025

principle here might be DRY

as first thing we read is trash just like the null checks. - very first attention already going into void. Thats bad design.

We cure this with functional programming, reducing everything. Then we are left over with only real business logic and not fluff.

@Pankraz76
Copy link
Contributor Author

FYI

@Pankraz76 Pankraz76 closed this May 13, 2025
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