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

Verify you want a Func<bool?> and not a Func<bool>? #74

Open
ghost opened this issue Aug 16, 2020 · 1 comment
Open

Verify you want a Func<bool?> and not a Func<bool>? #74

ghost opened this issue Aug 16, 2020 · 1 comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed Usability UX enhancements or issues about usability

Comments

@ghost
Copy link

ghost commented Aug 16, 2020

public Func<bool?> IsIgnored { get; internal set; } = () => false;

This might simply be two redundant null checks, but at certain places TestCase.IsIgnored is treated like TestCase.IsForced. For example in Xenial.Delicious.Execution.TestMiddleware.IgnoreTestMiddleware.UseIgnoreTestExecutor and Xenial.Delicious.Remote.TastyRemoteDefaults.AttachToStream where you check IsIgnored for null.

Just want to make sure it is not a misplaced '?' in the variable declaration.

@biohazard999
Copy link
Contributor

biohazard999 commented Aug 16, 2020

Good catch.

A test is either ignored or not, or is undefined. So for forcing tests I decided it would be okay to have the group mark the lower tree with it's outcome. That's the reason for the Func<bool?>. But it could be handled with Func<bool>? and Func<bool?>? as well. But to be honest, I am totally not happy with the shape of that feature (cause it's somewhat broken right now).
We don't have test filters right now, so I think that API should go away when we introduce filters (which I don't have any idea right now how to do properly yet)

AND:
We should make those unclear API's internal until we find the right API shape

@biohazard999 biohazard999 added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed Usability UX enhancements or issues about usability labels Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed Usability UX enhancements or issues about usability
Projects
None yet
Development

No branches or pull requests

1 participant