0
更改的對象,這是我想的方法來測試:斷定方法被調用與在該方法
public void Set1(ViewModelA viewModelA)
{
var viewModelB = new ViewModelB
{
FirstName = viewModelA.FirstName,
LastName = viewModelB.LastName
}
service.Set2(viewModelB);
}
我怎麼能斷言傳遞給service.Set2的viewModelB實例具有的屬性值從viewModelA映射並且Set2將viewModelB作爲參數?