Example #1
0
        public void AddSelectedEntitiesWhenSelectedEntitySetIsNullAndSelectedItemCountIsZero()
        {
            string entityLogicalName = "account_contact";

            inputEntityRelationships = new Dictionary <string, HashSet <string> >();
            var selectedItemsCount = 0;

            FluentActions.Invoking(() => systemUnderTest.AddSelectedEntities(selectedItemsCount, entityLogicalName, null))
            .Should()
            .NotThrow();
        }
Example #2
0
        public void HandleListViewEntitiesSelectedIndexChanged(Dictionary <string, HashSet <string> > inputEntityRelationships, string inputEntityLogicalName, HashSet <string> inputSelectedEntity, ListView.SelectedListViewItemCollection selectedItems, ServiceParameters serviceParameters)
        {
            ListViewItem listViewSelectedItem = selectedItems.Count > 0 ? selectedItems[0] : null;

            PopulateAttributes(inputEntityLogicalName, listViewSelectedItem, serviceParameters);

            PopulateRelationship(inputEntityLogicalName, inputEntityRelationships, listViewSelectedItem, serviceParameters);
            var controller = new EntityController();

            controller.AddSelectedEntities(selectedItems.Count, inputEntityLogicalName, inputSelectedEntity);
        }