一旦IOrganizationService对象被实例化,就可以模拟?
...更好
如何模拟实例化的IOrganizationService对象?
答案 0 :(得分:0)
IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
IOrganizationService service = serviceFactory.CreateOrganizationService(someUserId);