oblac / jodd

Jodd! Lightweight. Java. Zero dependencies. Use what you like.
https://jodd.org
BSD 2-Clause "Simplified" License
4.06k stars 723 forks source link

Parameterized test in DbPagerTest #782

Closed eas5 closed 3 years ago

eas5 commented 3 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

Current behavior

(1) A test method with many individual assertions stops being executed on the first failed assertion, which prevents the remaining ones' execution. (2) Classes containing test methods with repeated test code steps, typically, parts that set up test fixtures, generate additional effort in case of test maintenance.

New behavior?

Parameterized tests make it possible to run a test multiple times, with different arguments, as individual and independent tests. This way, we could make 1 original test become 3 independent ones, contributing to test maintenance efforts when needed. In this refactoring, no original assertion value was changed.

codecov[bot] commented 3 years ago

Codecov Report

Merging #782 (7ca515f) into master (2a841ee) will decrease coverage by 0.04%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #782      +/-   ##
============================================
- Coverage     52.25%   52.20%   -0.05%     
+ Complexity     2084     2082       -2     
============================================
  Files           293      293              
  Lines          9240     9240              
  Branches       1288     1288              
============================================
- Hits           4828     4824       -4     
- Misses         4037     4039       +2     
- Partials        375      377       +2     
Impacted Files Coverage Δ Complexity Δ
...ore/src/main/java/jodd/cache/AbstractCacheMap.java 77.90% <0.00%> (-4.66%) 26.00% <0.00%> (-2.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2a841ee...7ca515f. Read the comment docs.