public void SaveAndLoadDataTest() { var dataPersistance = new DataPersistance { Active = true, CreatedDate = DateTime.Now, UserName = "******", }; var data1 = new DataPoint { ControlName = "c1", TimeOfInteraction = DateTime.Now }; var data2 = new DataPoint { ControlName = "c2", TimeOfInteraction = DateTime.Now }; dataPersistance.Data.Add(data1); dataPersistance.Data.Add(data2); // Save the data var persistData = new PersistData(); persistData.SaveData(dataPersistance); // load the data var loadedData = persistData.LoadData("Sean"); Assert.IsTrue(dataPersistance.Equals(loadedData), "Unable to save data correctly"); }