public void SaveAs_Load_Save_Load() { EditableDataset dataset = CreateDatasetAndAddEntry(); string filename = Data.MakeOutputPath("SaveAs_Load_Save_Load.landis"); dataset.SaveAs(filename); dataset = null; EditableDataset loadedDataset = EditableDataset.Load(filename); Assert.IsNotNull(loadedDataset); Assert.AreEqual(1, loadedDataset.Count); loadedDataset.Add(barPlugInEntry); Assert.AreEqual(2, loadedDataset.Count); loadedDataset.Save(); loadedDataset = null; EditableDataset reloadedDataset = EditableDataset.Load(filename); Assert.AreEqual(2, reloadedDataset.Count); AssertEntriesAreEqual(fooPlugInEntry, reloadedDataset.Find(fooPlugInEntry.Name)); AssertEntriesAreEqual(barPlugInEntry, reloadedDataset.Find(barPlugInEntry.Name)); }
public void SaveAs_Load() { EditableDataset dataset = CreateDatasetAndAddEntry(); string filename = Data.MakeOutputPath("SaveAs_Load.landis"); dataset.SaveAs(filename); dataset = null; EditableDataset loadedDataset = EditableDataset.Load(filename); Assert.IsNotNull(loadedDataset); Assert.AreEqual(1, loadedDataset.Count); AssertEntriesAreEqual(fooPlugInEntry, loadedDataset[0]); IList <string> libs = fooPlugInEntry.ReferencedAssemblies; AssertListsAreEqual(libs, loadedDataset.ReferencedByEntries(libs)); }
public void SaveAs_Null() { EditableDataset dataset = EditableDataset.Create(); dataset.SaveAs(null); }