alexp11223
05/26/2017, 5:49 PMTestFx
? Or just tests for non-UI stuff?
btw if I am following MVVM, is it normal to have async methods like that in ViewModel?
fun loadTokens() {
tokens.clear() // observable list
runAsync(status) {
loadSomeStuff(someData).tokens
} ui {
tokens.addAll(it)
} fail {
fire(ErrorEvent(it))
}
}
I tried to test this VM and found out that I can't do it because of async 🙂
Also I just noticed that I use someData
(string property) inside async, which I guess is not very thread safe...