eeverman / eeverman/andhow

Improve Property and PropertyBuilder unit tests

Open
#614 2 comments 0 reactions 1 assignee Claimed by @alex-kar View on GitHub
enhancement help wanted
Dominant language
Java
Stars
25
Forks
34
PR merge metrics
No merged PRs in 30d

Description

The Property tests (`org.yarnandtail.andhow.property.XXXProp`) are missing for several classes and are a mix of unit and integration tests. Each test initializes AndHow with a set of XXXProp's and checks the resulting values using different combinations of loaders. This is useful testing, but it is missing some coverage of methods and branches, especially of the builder validation methods.

I propose:
* The current `XXXPropTest`s be renamed XXXPropAppTest (Testing how they behave in an app). Alternately, they could be named 'XXXPropIT` (Integration Test), but that implies that they are slow tests that might not be run every time and that is not needed.
* New tests created that are truly unit tests: Hit every method and every branch of code. Properties have a base class that allows access to a set values (sometimes indirectly), so its possible to verify the results of building an instance.
* Add unit tests that are missing: IntPropTest, LngPropTest, DblPropTest, FlagPropTest, LocalDateTimePropTest - others? Adding coverage for these classes will likely bump up the project coverage percentage and potentially reveal a bug or two.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.