public void AddNamedAndUnnamed() { IManagerStore dictionary = GetManagerStore(); dictionary.Add(string.Empty, GetManager()); dictionary.Add(GetManager()); Assert.AreEqual(2, dictionary.Count); }
public void ThrowDriverAlreadyExist() { IManagerStore dictionary = GetManagerStore(); dictionary.Add(GetManager()); dictionary.Add(GetManager()); Assert.Fail("Previous line should have failed the test."); }
public void ClearRemovesAll() { IManagerStore dictionary = GetManagerStore(); dictionary.Add(GetManager()); dictionary.Add(string.Empty, GetManager()); dictionary.Clear(); Assert.AreEqual(0, dictionary.Count); }
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>()); }
public void RemoveByType() { IManagerStore managerStore = GetManagerStore(); DriverManager managerToKeep = GetManager(); managerStore.Add(GetManager()); managerStore.Add(string.Empty, managerToKeep); managerStore.Remove <WebServiceDriverManager>(); Assert.AreEqual(managerToKeep, managerStore.GetManager(string.Empty)); }
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)); }
public void AddIncrementCount() { IManagerStore dictionary = GetManagerStore(); dictionary.Add(GetManager()); Assert.AreEqual(1, dictionary.Count); }
public void AddManagerByType() { IManagerStore managerStore = GetManagerStore(); managerStore.Add(GetManager()); Assert.IsTrue(managerStore.Contains <WebServiceDriverManager>()); }
public void CanOverrideExisting() { IManagerStore dictionary = GetManagerStore(); dictionary.Add(GetManager()); dictionary.AddOrOverride(GetManager()); Assert.AreEqual(1, dictionary.Count); }