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 Save_NonLoadedDataset() { EditableDataset dataset = EditableDataset.Create(); dataset.Save(); }