fun name(name: String) fun clickSearchButton() } interface SearchViewModelOutPuts : Output { fun state(): LiveData<SearchViewState> fun goResultActivity(): LiveData<String> } data class SearchViewState( val enableSearchButton: Boolean )
fun clickUser(user: User) fun clickHomeButton() } interface MainViewModelOutPuts : Output { fun state(): LiveData<MainViewState> fun refreshListData(): LiveData<Pair<User, List<Repo>>> fun showErrorToast(): LiveData<String> fun goProfileActivity(): LiveData<String> fun finish(): LiveData<Unit> } data class MainViewState( val showLoading: Boolean, val title: String )
var userName: String val viewModel: MainViewModel by inject { parametersOf(userName) } val getUserData: GetUserData by inject() Feature("MainViewModel spec") {…} })