-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
MVVM ViewModels are Pojos, so they are easy to test... At least, that's half the truth. In reality, ViewModels also contain a lot of annotations (@Command
, @GlobalCommand
, @NotifyChanges
). Of course I can test the pojo, but much of the logic is in the annotations, so while 100% of the pojo may be executed, not nearly 100% of the ViewModel will be tested.
Obviously it would be great to test the ViewModel from the Outside, for example by allowing me to do this..
MyViewModel vm = new MyViewModel();
BindTestUtil.save(vm, "firstName", "Franklin");
BindTestUtil.verifyNotifyChanged(vm, "someProperty");
Is there any way to do this? Preferably without having to simulate ZK's code, since that will only lead to guessing what it might do. ZATS is also overkill for a test like this.... Better ideas, anyone?
Hello q5618306,
First of all welcome to the group.
There are a lot of resources in order to learn zk including:
An extensive documentation
Demos of all the components
https://www.zkoss.org/zkdemo/grid
The zk sandbox where you can test your code:
https://www.zkoss.org/zksandbox/
Finally it is a good practice when you have a new question, to create a new forum post :)
Best Regards,
Darksu
Asked: 2016-08-29 19:34:07 +0800
Seen: 18 times
Last updated: Sep 01 '16
Databinding and auto-complete on combobox
Composite component and bind in ZK 6
How to detach / reattach MVVM windows?
Is there a way to resolve view model properties as input to client side javascripts?
How can I synchronize data in a ListBox in MVVM ? [closed]
MVVM Validator: class not found ? [closed]
How to Call Child ViewModel Method from Parent Window? [closed]