public void Save_and_Load_work() { var manager = new UserSettingsManager(); var settings = manager.LoadIfExists() ?? manager.MigrateOrDefault(); var b = (byte)(new Random().NextDouble() * 255); settings.WhitebalanceBlue = b; // Save should happen automatically! var settings2 = manager.LoadIfExists(); Assert.AreEqual(b, settings.WhitebalanceBlue, "settings.WhitebalanceBlue"); }
public void Save_and_Load_work() { var manager = new UserSettingsManager(); var settings = manager.LoadIfExists() ?? manager.MigrateOrDefault(); var testDate = DateTime.UtcNow; settings.LastUpdateCheck = testDate; //save should happen automatically! var settings2 = manager.LoadIfExists(); Assert.AreEqual(testDate, settings.LastUpdateCheck, "settings.LastUpdateCheck"); }
public void Migration_works() { var manager = new UserSettingsManager(); var settings = manager.MigrateOrDefault(); }