public void RemoveUnknownName() { EditableDataset dataset = CreateDatasetAndAddEntry(); IDatasetEntry removedEntry = dataset.Remove("Unknown name"); Assert.AreEqual(1, dataset.Count); Assert.IsNull(removedEntry); }
public void RemoveFromEmpty() { EditableDataset dataset = EditableDataset.Create(); IDatasetEntry removedEntry = dataset.Remove(fooPlugInEntry.Name); Assert.AreEqual(0, dataset.Count); Assert.IsNull(removedEntry); }
public void ReferencedByAfterRemove() { EditableDataset dataset = CreateDatasetAndAddEntry(); dataset.Add(barPlugInEntry); // Both plug-ins reference the same lib (nunit.framework) List <string> libs = new List <string>(); libs.Add("nunit.framework"); AssertListsAreEqual(libs, dataset.ReferencedByEntries(libs)); dataset.Remove(fooPlugInEntry.Name); AssertListsAreEqual(libs, dataset.ReferencedByEntries(libs)); dataset.Remove(barPlugInEntry.Name); AssertListsAreEqual(new List <string>(), dataset.ReferencedByEntries(libs)); }
public void Create_Add_Remove() { EditableDataset dataset = CreateDatasetAndAddEntry(); IDatasetEntry removedEntry = dataset.Remove(fooPlugInEntry.Name); Assert.AreEqual(0, dataset.Count); Assert.IsNotNull(removedEntry); AssertEntriesAreEqual(fooPlugInEntry, removedEntry); IList <string> libs = fooPlugInEntry.ReferencedAssemblies; AssertListsAreEqual(new List <string>(), dataset.ReferencedByEntries(libs)); }
public void RemoveNull() { EditableDataset dataset = EditableDataset.Create(); dataset.Remove(null); }