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>()); }
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]); }