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

refactor: Use built-in providers for installer model #718

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

spydon
Copy link
Collaborator

@spydon spydon commented Apr 25, 2024

Part of #717

@spydon spydon requested a review from d-loose April 25, 2024 09:54
Comment on lines +81 to +84
final mockInstallerService = MockInstallerService();
when(mockInstallerService.monitorStatus()).thenAnswer(
(_) => Stream.value(fakeApplicationStatus(ApplicationState.RUNNING)),
);
Copy link
Member

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?

Copy link
Collaborator Author

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.

Copy link
Member

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 :)

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

Successfully merging this pull request may close these issues.

2 participants