Add ShareRecipeViewModel tests

This commit is contained in:
Kirill Kamakin
2022-11-29 20:42:56 +01:00
parent 4a68916433
commit e1b29f3806
2 changed files with 92 additions and 2 deletions

View File

@@ -27,9 +27,29 @@ sealed class OperationUiState<T> {
progressBar.isVisible = isProgress
}
class Initial<T> : OperationUiState<T>()
class Initial<T> : OperationUiState<T>() {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
return true
}
class Progress<T> : OperationUiState<T>()
override fun hashCode(): Int {
return javaClass.hashCode()
}
}
class Progress<T> : OperationUiState<T>() {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
return true
}
override fun hashCode(): Int {
return javaClass.hashCode()
}
}
data class Failure<T>(val exception: Throwable) : OperationUiState<T>()