Ejemplo n.º 1
0
        public void RemoveByName()
        {
            IManagerStore dictionary    = GetManagerStore();
            DriverManager managerToKeep = GetManager();

            dictionary.Add(managerToKeep);
            dictionary.Add(string.Empty, GetManager());
            dictionary.Remove(string.Empty);

            Assert.AreEqual(((WebServiceDriverManager)managerToKeep).Get(), dictionary.GetDriver <EventFiringWebServiceDriver, WebServiceDriverManager>());
        }
Ejemplo n.º 2
0
        public void ManagersMap()
        {
            IManagerStore managerStore   = GetManagerStore();
            DriverManager managerToKeep  = GetManager();
            DriverManager managerToKeep2 = GetManager();

            managerStore.Add(managerToKeep);
            managerStore.Add(string.Empty, managerToKeep2);

            Assert.AreEqual(((WebServiceDriverManager)managerToKeep).Get(), managerStore.GetDriver <EventFiringWebServiceDriver, WebServiceDriverManager>());
            Assert.AreEqual(managerToKeep2, managerStore.GetManager(string.Empty));
        }