Exemple #1
0
 private void setupAddRemoveMethods(TECSystem system)
 {
     deleteControllerMethod = controller =>
     {
         system.RemoveController(controller);
     };
     deletePanelMethod = panel => { system.Panels.Remove(panel); };
 }
        public void RemoveControllerTest()
        {
            bool                  raised     = false;
            TECSystem             system     = new TECSystem();
            TECProvidedController controller = new TECProvidedController(new TECControllerType(new TECManufacturer()));

            system.AddController(controller);

            system.TECChanged += args =>
            {
                raised = true;
            };

            system.RemoveController(controller);

            Assert.IsTrue(raised);
            Assert.IsFalse(system.Controllers.Contains(controller));
        }