Exemplo n.º 1
0
        public void OneTimeSetUp()
        {
            FileStructure.CreatePlayerScorePersistenceFolder();

            playerScoreIO = new PlayerScoreIO();
            foreach (var score in record)
            {
                playerScoreIO.SavePlayerScore(score);
            }
            //playerScoreIO.ReloadPlayerScoresFromSave();
        }
Exemplo n.º 2
0
        public void GetAllPlayerScoreTest()
        {
            PlayerScoreIO playerScoreIO = new PlayerScoreIO();

            playerScoreIO.SavePlayerScore(new PlayerScoreRecord(
                                              new PlayerScore(1000, 320, PlayerScore.Stage.Stage4, 0.32f),
                                              new SelectedGame(new SelectedCharacter(0, 1), new SelectedStages(0, SelectedStages.StageDiffculity.Easy)),
                                              "foo", DateTime.Now));

            playerScoreIO.SavePlayerScore(new PlayerScoreRecord(
                                              new PlayerScore(1000, 320, PlayerScore.Stage.Stage4, 0.32f),
                                              new SelectedGame(new SelectedCharacter(0, 1), new SelectedStages(0, SelectedStages.StageDiffculity.Easy)),
                                              "bar", DateTime.Now));
        }
Exemplo n.º 3
0
        public void SavePlayerScoreTest()
        {
            PlayerScoreIO playerScoreIO = new PlayerScoreIO();

            playerScoreIO.SavePlayerScore(new PlayerScoreRecord(
                                              new PlayerScore(1000, 320, PlayerScore.Stage.Stage4, 0.32f),
                                              new SelectedGame(new SelectedCharacter(0, 1), new SelectedStages(0, SelectedStages.StageDiffculity.Easy)),
                                              "foo-bar", DateTime.Now));

            DirectoryInfo playerRecordDirectory = new DirectoryInfo(FileStructure.PlayerScorePersistencePath);

            FileInfo[] record = playerRecordDirectory.GetFiles();

            Assert.That(record.Length == 1);
        }