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

Setter Binding Convenience for Fixtures #775

Open
jeremydmiller opened this issue May 27, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@jeremydmiller
Copy link
Member

commented May 27, 2019

It might be an easy way to make the Fixture code easier to write.

So a property like this:

public SomeService {get;set;}

would automatically get filled by a call to IServiceProvider.GetInstance<T>() when starting a new test. Or fall back to State.Get() if the T has no ctor arguments.

Otherwise, use some kind of attribute to make it be explicit:

[Service]
public SomeService {get;set;}

or

[State]
public SomeService {get;set;}

Also, have the value put back into the State tracking during the tear down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.