public void ReleaseBatchInfoByIdTest() { var px = new MOrganizationServiceProxy(); px.BehaveAsDefaultValue(); CrmServiceClient crmaction = new CrmServiceClient(px); Guid sampleGuid = Guid.NewGuid(); bool methodCalled = false; MBatchManager.AllInstances.RemoveBatchGuid = (objBatchManager, guid) => { methodCalled = true; Assert.AreEqual(guid, sampleGuid); }; crmaction.ReleaseBatchInfoById(sampleGuid); Assert.IsTrue(methodCalled); }
public void TestInitialize() { this.orgProxy = new MOrganizationServiceProxy(); orgProxy.BehaveAsDefaultValue(); BCrmWebSvc.MockCrmSvc(orgProxy); BCrmWebSvc.MockDoLogin(); BCrmWebSvc.MockOrganizationVersion(); crmaction = new CrmServiceClient(this.orgProxy); MDynamicEntityUtility.AllInstances.GetAttributeDataByEntityStringGuidStringArray = (dynamicEntUtl, str, inguid, arrstr) => { return(new List <AttributeData>()); }; MetadataUtility.ClearCachedEntityMetadata("account"); }