public void Load(string outputFolder) { _outputFolder = outputFolder; PersistenceHelper <ShowControl> ph = new PersistenceHelper <ShowControl>(outputFolder); _shows = ph.LoadData(); FixPath(); }
public void ShouldLoadSavedData() { RemoveTempFolder(); TempSaveable tempSaveable = new TempSaveable { Name = "MyName", OtherData = "OtherData", Modifyed = true }; PersistenceHelper <TempSaveable> ph = new PersistenceHelper <TempSaveable>(GetOutputFolder()); ph.SaveData(new List <ISaveable>() { tempSaveable }); ObservableCollection <TempSaveable> loadItems = ph.LoadData(); loadItems.Should().HaveCount(1); loadItems[0].Name.Should().Be("MyName"); loadItems[0].OtherData.Should().Be("OtherData"); }