Ejemplo n.º 1
0
 public void PlayerInfoCompareToWithSecondPlayerBetter()
 {
     BullsAndCows.PlayerInfo firstDemoPlayer = new BullsAndCows.PlayerInfo("Master Nakov", 7);
     BullsAndCows.PlayerInfo secondDemoPlayer = new BullsAndCows.PlayerInfo("Niki", 3);
     int compareResult = firstDemoPlayer.CompareTo(secondDemoPlayer);
     Assert.IsTrue(compareResult > 0);
 }
Ejemplo n.º 2
0
 public void PlayerInfoCompareToWithEqualPlayers()
 {
     BullsAndCows.PlayerInfo firstDemoPlayer = new BullsAndCows.PlayerInfo("Ninja Player", 4);
     BullsAndCows.PlayerInfo secondDemoPlayer = new BullsAndCows.PlayerInfo("Ninja Player", 4);
     int compareResult = firstDemoPlayer.CompareTo(secondDemoPlayer);
     Assert.AreEqual(0, compareResult);
 }