Skip to content

Instantly share code, notes, and snippets.

@PreyeaRegmi
Last active September 8, 2021 12:00
Show Gist options
  • Save PreyeaRegmi/830adb77aa0344d62f9358a3bd344b82 to your computer and use it in GitHub Desktop.
Save PreyeaRegmi/830adb77aa0344d62f9358a3bd344b82 to your computer and use it in GitHub Desktop.
test(
"Fetch loan should not fail with any exception when mocked with success response",
() {
FetchLoanDetail fetchLoanUseCase =
FetchLoanDetail(MockedSucessRateFetchRepository(LoanDetailDTO(3)));
fetchLoanUseCase.execute(LoanParamRequest(100, 2), (data) {
}, expectAsync1((error) {
expect(error, isNot(isInstanceOf<UseCaseNotImplementedException>()),
reason: "There is no implementation added to this use case");
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment