public void TestPlayerConstructorIfReturnValidMovesState() { var player = new Player(); var actual = player.Moves; var expected = 0; Assert.AreEqual(actual, expected); }
public void TestPlayerConstructorIfReturnsValidNameState() { var player = new Player(); var actual = player.Name; var expected = "Guest"; Assert.AreEqual(actual, expected); }
public void TestPlayerConstructorIfInputIsProvidedReturnsValidNameState() { var player = new Player("Pesho"); var actual = player.Name; var expected = "Pesho"; Assert.AreEqual(actual, expected); }
public void TestPlayerSetName() { var player = new Player(); player.Name = "Pesho"; var actual = player.Name; var expected = "Pesho"; Assert.AreEqual(actual, expected); }
public void TestGetTextRepresentationWhenPlayerHasOneMove() { var player = new Player("Pesho"); player.Moves = 1; var actual = player.GetTextRepresentation(); var expected = "Pesho -> 1 move"; Assert.AreEqual(actual, expected); }
public void TestPlayerSetNameShpuldThrowWhenEmptyName() { var player = new Player(); player.Name = string.Empty; }
/// <summary> /// Clones a Player. /// </summary> /// <returns>A clone of the current player.</returns> public object Clone() { var clone = new Player(this.Name); clone.Moves = this.Moves; return clone; }