Skip to content

Instantly share code, notes, and snippets.

@Bharathh-Raj
Last active March 17, 2022 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bharathh-Raj/9504e0b8df57cda09e599f2441293ef4 to your computer and use it in GitHub Desktop.
Save Bharathh-Raj/9504e0b8df57cda09e599f2441293ef4 to your computer and use it in GitHub Desktop.
//Note: This code is just for demonstration purpose
class MockRemoteDateSourceSuccess implements RemoteDateSource {
@override
Future<String> fetch() async {
return Future.value("Mock Result");
}
}
class MockRemoteDateSourceFailure implements RemoteDateSource {
@override
Future<String> fetch() async {
throw SocketException("Mock exception");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment