Esempio n. 1
0
        public void RemoveUnknownName()
        {
            EditableDataset dataset      = CreateDatasetAndAddEntry();
            IDatasetEntry   removedEntry = dataset.Remove("Unknown name");

            Assert.AreEqual(1, dataset.Count);
            Assert.IsNull(removedEntry);
        }
Esempio n. 2
0
        public void RemoveFromEmpty()
        {
            EditableDataset dataset      = EditableDataset.Create();
            IDatasetEntry   removedEntry = dataset.Remove(fooPlugInEntry.Name);

            Assert.AreEqual(0, dataset.Count);
            Assert.IsNull(removedEntry);
        }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
        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));
        }
Esempio n. 5
0
        public void RemoveNull()
        {
            EditableDataset dataset = EditableDataset.Create();

            dataset.Remove(null);
        }