public void StoreAttriubteIfKeyExistsInputEntityAttributesDoesNotContainEntityLogicalName()
        {
            var entityLogicalName    = "contact";
            var attributeLogicalName = "contactid";
            var itemCheckEventArgs   = new System.Windows.Forms.ItemCheckEventArgs(0, System.Windows.Forms.CheckState.Unchecked, System.Windows.Forms.CheckState.Checked);

            FluentActions.Invoking(() => systemUnderTest.StoreAttriubteIfKeyExists(attributeLogicalName, itemCheckEventArgs, inputEntityAttributes, entityLogicalName))
            .Should()
            .Throw <KeyNotFoundException>();
        }
Esempio n. 2
0
        private void ListViewAttributesItemCheck(object sender, ItemCheckEventArgs e)
        {
            var indexNumber = e.Index;
            var logicalName = lvAttributes.Items[indexNumber].SubItems[1].Text;
            var controller  = new AttributeController();

            if (entityAttributes.ContainsKey(entityLogicalName))
            {
                controller.StoreAttriubteIfKeyExists(logicalName, e, entityAttributes, entityLogicalName);
            }
            else
            {
                controller.StoreAttributeIfRequiresKey(logicalName, e, entityAttributes, entityLogicalName);
            }
        }