-
-
Save 5AbhishekSaxena/794cdbb2a53263206101f2cd379b0180 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
val user = User("Abhishek Saxena") | |
val fakeUserDataSource = FakeUserDataSource() | |
val userRepositoryWithFakeDataSource = UserRepository(fakeUserDataSource) | |
userRepositoryWithFakeDataSource.save(user) // Calling save in fake data source. | |
val remoteUserDataSource = RemoteUserDataSource() | |
val userRepositoryWithRemoteDataSource = UserRepository(remoteUserDataSource) | |
userRepositoryWithRemoteDataSource.save(user) // Calling save in remote data source. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment