public void CreateEntityAssociationTest() { OrganizationRequest orgReq = null; Guid respId = Guid.NewGuid(); BCrmServiceClient.MockCrmCommandExecute(); bool result = crmaction.CreateEntityAssociation("account", respId, "contact", respId, "somerelation"); Assert.IsTrue(result); orgReq = BCrmServiceClient.GetRequest(typeof(AssociateEntitiesRequest)); Assert.IsNotNull(((AssociateEntitiesRequest)orgReq).Moniker1); Assert.IsNotNull(((AssociateEntitiesRequest)orgReq).Moniker2); Assert.AreEqual(((AssociateEntitiesRequest)orgReq).RelationshipName, "somerelation"); result = crmaction.CreateEntityAssociation("", respId, "", respId, ""); Assert.IsFalse(result); }