コード例 #1
0
        public async Task ShouldInitallyHaveTheHighScoreSetToZeroAsync()
        {
            var storage = new InMemoryHighScoreStorage();

            (await storage.GetHighScore())
            .Should().Be(0);
        }
コード例 #2
0
        public async Task ShouldReturnLastStoredHighScore()
        {
            var storage = new InMemoryHighScoreStorage();

            await storage.SetHighScore(1);

            await storage.SetHighScore(2);

            await storage.SetHighScore(3);

            (await storage.GetHighScore())
            .Should().Be(3);
        }