Skip to content

Commit

Permalink
[refactor] 리모트 get 이외 접근시 그냥 Exception 발생으로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
malibinYun committed Jun 12, 2020
1 parent a033464 commit 591c42d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 10 deletions.
25 changes: 25 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,31 @@ class VillagersRemoteDataSource(
}

override suspend fun fetchVillager(amiiboIndex: Int): Villager? {
// Cannot Write Remote Source
return null
throw UnsupportedOperationException("Cannot call fetchVillager in remote source")
}

override suspend fun getVillagersInHome(): List<Villager> {
// Cannot Write Remote Source
return emptyList()
throw UnsupportedOperationException("Cannot call getVillagersInHome in remote source")
}

override suspend fun getFavoriteVillagers(): List<Villager> {
// Cannot Write Remote Source
return emptyList()
throw UnsupportedOperationException("Cannot call getFavoriteVillagers in remote source")
}

override suspend fun saveVillagers(villagers: List<Villager>) {
// Cannot Write Remote Source
throw UnsupportedOperationException("Cannot call saveVillagers in remote source")
}

override suspend fun deleteAllVillagers() {
// Cannot Write Remote Source
throw UnsupportedOperationException("Cannot call deleteAllVillagers in remote source")
}

override suspend fun checkFavoriteVillager(villager: Villager, isChecked: Boolean) {
// Cannot Write Remote Source
throw UnsupportedOperationException("Cannot call checkFavoriteVillager in remote source")
}

override suspend fun checkHomeVillager(villager: Villager, isChecked: Boolean) {
// Cannot Write Remote Source
throw UnsupportedOperationException("Cannot call checkHomeVillager in remote source")
}

}

0 comments on commit 591c42d

Please sign in to comment.