예제 #1
0
        public void RemoveByName()
        {
            ManagerDictionary dictionary    = GetDictionary();
            DriverManager     managerToKeep = GetManager();

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

            Assert.AreEqual(((WebServiceDriverManager)managerToKeep).Get(), dictionary.GetDriver <EventFiringWebServiceDriver, WebServiceDriverManager>());
        }
예제 #2
0
        public void ManagersMap()
        {
            ManagerDictionary dictionary     = GetDictionary();
            DriverManager     managerToKeep  = GetManager();
            DriverManager     managerToKeep2 = GetManager();

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

            Assert.AreEqual(((WebServiceDriverManager)managerToKeep).Get(), dictionary.GetDriver <EventFiringWebServiceDriver, WebServiceDriverManager>());
            Assert.AreEqual(managerToKeep2, dictionary[string.Empty]);
        }