public void StoreRelationshipIfRequiresKeyCurrentValueUnchecked() { var relationshipLogicalName = "contact_account"; var inputEntityLogicalName = "contact"; var itemCheckEventArgs = new System.Windows.Forms.ItemCheckEventArgs(0, System.Windows.Forms.CheckState.Checked, System.Windows.Forms.CheckState.Unchecked); FluentActions.Invoking(() => systemUnderTest.StoreRelationshipIfRequiresKey(relationshipLogicalName, itemCheckEventArgs, inputEntityLogicalName, inputEntityRelationships)) .Should() .NotThrow(); inputEntityRelationships[inputEntityLogicalName].Contains(relationshipLogicalName).Should().BeTrue(); }
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); } }