public void Add_Remove_ByIndex_Success() { FacilityOverrideCollection c = new FacilityOverrideCollection(); FacilityOverrideElement e = new FacilityOverrideElement() { AssemblyName = TestAssembly, Identifier = 42 }; c.Add(e); Assert.AreEqual(0, c.IndexOf(e)); c.RemoveAt(0); Assert.AreEqual(-1, c.IndexOf(e)); }
public void Add_Remove_ByName_Success() { FacilityOverrideCollection c = new FacilityOverrideCollection(); FacilityOverrideElement e = new FacilityOverrideElement() { AssemblyName = TestAssembly, Identifier = 42 }; c.Add(e); Assert.IsNotNull(c[TestAssembly]); c.Remove(TestAssembly); Assert.IsNull(c[TestAssembly]); }
public void Clear_Success() { FacilityOverrideCollection c = new FacilityOverrideCollection(); FacilityOverrideElement e = new FacilityOverrideElement() { AssemblyName = TestAssembly, Identifier = 42 }; c.Add(e); c[0] = e; Assert.AreEqual(0, c.IndexOf(e)); c.Clear(); Assert.AreEqual(-1, c.IndexOf(e)); }