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

Fix isOn() for float values #30

Merged
merged 1 commit into from
Jul 6, 2023
Merged

Fix isOn() for float values #30

merged 1 commit into from
Jul 6, 2023

Conversation

tinahollygb
Copy link
Contributor

fixes #29 check for instance of Double in FeatureResult#isOn()

Comment on lines +119 to +129
@Test
void featureResult_isOn_withNonZeroValue_returnsTrue_forDoubles() {
FeatureResult<Double> subject = FeatureResult
.<Double>builder()
.value(1.0)
.source(FeatureResultSource.FORCE)
.build();

assertTrue(subject.isOn());
assertFalse(subject.isOff());
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the test case that would fail.

@tinahollygb tinahollygb merged commit aa04bfa into main Jul 6, 2023
6 checks passed
@tinahollygb tinahollygb deleted the bugfix/29-isOn-floats branch July 6, 2023 23:09
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.

[Bug] isOn() does not return true for truthy Float values
1 participant