-
Notifications
You must be signed in to change notification settings - Fork 36
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
refactor: Use built-in providers for installer model #718
base: main
Are you sure you want to change the base?
Conversation
final mockInstallerService = MockInstallerService(); | ||
when(mockInstallerService.monitorStatus()).thenAnswer( | ||
(_) => Stream.value(fakeApplicationStatus(ApplicationState.RUNNING)), | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it maybe be better to override the new applicationStatusProvider
in buildConfirmPage
, instead of adding a mock response to the service?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's either or I guess. Like this the code goes through the real provider too so one could argue that it gives slightly more code coverage, in this case I don't think it matters, so possibly we should override the provider since that is what we're doing in many other places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, good point. Let's talk about it sometime next week and agree on a consistent approach so that testing in this code base becomes less of a nightmare :)
Part of #717