Exemple #1
0
        public void StoreRelationshipIfKeyExistsInputEntityRelationshipsDoesNotContainEntityLogicalName()
        {
            var relationshipLogicalName = "contact_account";
            var inputEntityLogicalName  = "contact";

            var itemCheckEventArgs = new System.Windows.Forms.ItemCheckEventArgs(0, System.Windows.Forms.CheckState.Unchecked, System.Windows.Forms.CheckState.Checked);

            FluentActions.Invoking(() => systemUnderTest.StoreRelationshipIfKeyExists(relationshipLogicalName, itemCheckEventArgs, inputEntityLogicalName, inputEntityRelationships))
            .Should()
            .Throw <KeyNotFoundException>();
        }
Exemple #2
0
        private void ListViewRelationshipItemCheck(object sender, ItemCheckEventArgs e)
        {
            var indexNumber = e.Index;
            var logicalName = lvRelationship.Items[indexNumber].SubItems[1].Text;
            var controller  = new RelationshipController();

            if (entityRelationships.ContainsKey(entityLogicalName))
            {
                controller.StoreRelationshipIfKeyExists(logicalName, e, entityLogicalName, entityRelationships);
            }
            else
            {
                controller.StoreRelationshipIfRequiresKey(logicalName, e, entityLogicalName, entityRelationships);
            }
        }