public void CreateNewActivityEntryTest() { OrganizationRequest orgReq = null; Guid respId = Guid.NewGuid(); MCreateResponse orgResp = new MCreateResponse(); orgResp.idGet = () => respId; BCrmServiceClient.AddResponse(typeof(CreateRequest), orgResp); BCrmServiceClient.MockCrmCommandExecute(); string activityName = "fax"; Guid id = crmaction.CreateNewActivityEntry(activityName, "", respId, "testmail", "", ""); Assert.AreEqual(respId, id); orgReq = BCrmServiceClient.GetRequest(typeof(CreateRequest)); Assert.AreEqual(activityName, ((CreateRequest)orgReq).Target.LogicalName); }