-
Notifications
You must be signed in to change notification settings - Fork 74
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 TreehouseApp an interface #1737
Conversation
I'm pretty opposed to the idea that someone could effectively mock this interface and provide suitable behavior. Mocking service types that you don't own is a pretty strong indicator of a broken test that is encoding implementation details in the test (change detector test) rather than observing visible effects. I'd be interested in what is being tested and what the goal of the test actually is. That should tell us whether we need to provide a fake (#322) or whether the test should be running against a real implementation instead. |
I ran into a case where a class depends on (has an injected) |
I'm also skeptical as to whether a fake makes sense for this type in general (we've gone a long time without one!). I'd be curious what the test is doing and what it expects from the fake as opposed to a real implementation on the JVM. But I guess I'll have to wait and someone else can weigh in on a near term solution to unblock. |
I left a DM to you (I know you are not checking DMs while you are out 🥲). I think for now a fake TreehouseApp will do, will close this PR and try to add a fake. |
@jingwei99 Probably a good discussion topic for today's treehouse meeting later today! |
chatted with @colinrtwhite during the meeting today, since this not urgent*, I'll close this PR, and we'll chat about it when @JakeWharton is back. not urgent: I've found a walk-around for the need to have a fake, so this is more of a follow-up to be proactive to not to get to the same place again, other than something blocking and needs an urgent change. |
This makes it easier to mock
TreehouseApp
for testing in downstream repo(s).