如何在使用 MVVM 調用異步方法的單元測試 DelegateCommand
1 回答

慕妹3146593
TA貢獻1820條經驗 獲得超9個贊
采用以下方法:
[TestMethod]
public void Command_Test_GetTasksCommand()
{
MyViewModel.GetTaskCommand.Execute(); // this should populate ViewModel.SimpleTask
Assert.IsTrue(MyBiewModel.SimpleTask != null)
}
- 1 回答
- 0 關注
- 745 瀏覽
添加回答
舉報
0/150
提交
取消