public void PlayerIsCreatedWithCorrectFirstName() { var player = new Player("Pesho", 0); string actual = player.PlayerName; string expected = "Pesho"; Assert.AreEqual(actual, expected); }
public void PlayerIsCreatedWithCorrectScore() { var player = new Player("Gosho", 7); var actual = player.Score; uint expected = 7; Assert.AreEqual(actual, expected); }
/// <summary> /// Adds a new player to TopFiveRecords /// </summary> /// <param name="player">The Player instance to be added</param> public void AddNewRecord(Player player) { this.TopFiveRecords.Add(player); this.topFiveRecords.Sort( delegate(Player p1, Player p2) { return p1.Score.CompareTo(p2.Score); }); this.topFiveRecords = this.topFiveRecords.Take(5).ToList(); this.memory.ScoreboardMemento = this.SaveTopFive(); this.SaveRecordsToFile(this.memory.ScoreboardMemento); }
public void PlayerInvalidNameTest(string name) { var player = new Player(name, 7); }