public void StatsShouldPersistAccrossInstances() { StatsModel stats1 = new StatsModel(); stats1.NumberOfGamesPlayed = 15; stats1.BestScore = 4; StatsModel stats2 = new StatsModel(); stats2.Load(); Assert.AreEqual(15, stats2.NumberOfGamesPlayed); Assert.AreEqual(4, stats2.BestScore); }
public void ResetShouldWipeOutPersistedData() { StatsModel stats1 = new StatsModel(); stats.NumberOfGamesPlayed = 15; stats.BestScore = 4; stats1.Reset(); StatsModel stats2 = new StatsModel(); stats2.Load(); Assert.AreEqual(0, stats2.NumberOfGamesPlayed); Assert.AreEqual(-1, stats2.BestScore); }
public void SetUp() { stats = new StatsModel(); stats.Reset(); }