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

Make IStartConfiguration<T> internal #864

Closed
thomaslevesque opened this issue Sep 18, 2016 · 5 comments
Closed

Make IStartConfiguration<T> internal #864

thomaslevesque opened this issue Sep 18, 2016 · 5 comments

Comments

@thomaslevesque
Copy link
Member

thomaslevesque commented Sep 18, 2016

This is the unnatural fake equivalent of IFakeConfigurationManager (which is internal). I don't think there's ever been any good reason to make it public.

There are 2 classes that implement it:

  • Fake<T> (but its members are never called through the interface)
  • StartConfiguration<T>, which members are called from Fake<T>

For consistency with IFakeConfigurationManager, it should probably be hidden from the public API.

@blairconrad
Copy link
Member

blairconrad commented Sep 18, 2016

Agreed, @thomaslevesque. Nice find.

While looking at this, I notice that there's a convenience method CustomArgumentConstraints.Fakes that's used in some Fake<T> unit tests. I can't imagine this being useful to anyone writing tests (except possibly tests of FakeItEasy). What do you think of removing/hiding it? (just noticed that the thing I was talking about was only defined in our test project)

@blairconrad
Copy link
Member

Truth be told, I'm not entirely sure why StartConfiguration is a separate class. It could be folded right into Fake<T>, IMO.

@thomaslevesque
Copy link
Member Author

Truth be told, I'm not entirely sure why StartConfiguration is a separate class.

Probably for the same reason FakeConfigurationManager is separate from A.

It could be folded right into Fake, IMO.

I guess it could, but it would become inconsistent with A (not sure how much it matters)

@blairconrad
Copy link
Member

Good point about the inconsistency. And even if we wanted to fold it, we could do it later with impunity. Just an idle thought. Thanks!

@blairconrad
Copy link
Member

This issue has been released in FakeItEasy 3.0.0:
https://github.com/FakeItEasy/FakeItEasy/releases/3.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants