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 RemoveByType() { ManagerDictionary dictionary = GetDictionary(); DriverManager managerToKeep = GetManager(); dictionary.Add(GetManager()); dictionary.Add(string.Empty, managerToKeep); dictionary.Remove(typeof(WebServiceDriverManager)); Assert.AreEqual(managerToKeep, dictionary[string.Empty]); }