neoremind / fluent-validator

A Java validation framework leveraging fluent interface style and JSR 303 specification
Apache License 2.0
1.02k stars 222 forks source link

Test improvement: removed assertion roulette (test smell) #50

Closed eas5 closed 4 years ago

eas5 commented 4 years ago

This is a test refactoring.

Problem: The Assertion Roulette test smell occurs when a test method has multiple non-documented assertions. Various assertion statements in a test method without a descriptive message impacts the readability/understandability/maintainability as it is not possible to tell the exact reason for the failure of the test.

Solution: The original test was split into 19 new ones, each one for a primitive type being tested.

neoremind commented 4 years ago

LGTM, @eas5 thanks for your contribution!