Skip to content

Instantly share code, notes, and snippets.

@PreyeaRegmi
Last active September 8, 2021 12:01
Show Gist options
  • Save PreyeaRegmi/403bbbf9cde4a9725f988a93d5c93e1d to your computer and use it in GitHub Desktop.
Save PreyeaRegmi/403bbbf9cde4a9725f988a93d5c93e1d to your computer and use it in GitHub Desktop.
test(
"Use case must also fail when fetch loan fails from network",
() {
FetchLoanDetail fetchLoanUseCase =
FetchLoanDetail(MockedFailedRateFetchRepository(RateFetchFailType.NETWORK));
fetchLoanUseCase.execute(LoanParamRequest(100, 2), (data) {
}, expectAsync1((error) {
expect(error, isNot(isInstanceOf<RateFetchFailException>()),
reason: "Usecase didn't fail with RateFetchException on network failure");
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment