public void SetRandomOption() { string choice = SelectRandomOption(); RPSGame RPSGame = new RPSGame(); RPSGame.setComputerSelection(choice); Assert.AreSame(RPSGame.ComputerSelection, choice); }
public override void SetSelectionRock() { string s = ""; do { s = SelectRandomOption(); } while (s != "Rock"); RPSGame RPSGame = new RPSGame(); RPSGame.setComputerSelection(s); Assert.AreSame(RPSGame.ComputerSelection, "Rock"); }
public override void SetSelectionScissors() { string s = ""; do { s = SelectRandomOption(); } while (s != "Scissors"); RPSGame RPSGame = new RPSGame(); RPSGame.setComputerSelection(s); Assert.AreSame(RPSGame.HumanSelection, "Scissors"); }
/// <summary> /// These three methods differ from human selection because I am re-rolling the randomizer until /// it's the right value for the test /// </summary> public override void SetSelectionPaper() { string s = ""; do { s = SetRandomOptionBeatRock(); } while (s != "Paper"); RPSGame RPSGame = new RPSGame(); RPSGame.setComputerSelection(s); Assert.AreSame(RPSGame.HumanSelection, "Paper"); }
public override void SetSelectionScissors() { RPSGame RPSGame = new RPSGame(); RPSGame.SetHumanSelection("Scissors"); Assert.AreSame(RPSGame.HumanSelection, "Scissors"); }
public override void SetSelectionRock() { RPSGame RPSGame = new RPSGame(); RPSGame.SetHumanSelection("Rock"); Assert.AreSame(RPSGame.HumanSelection, "Rock"); }
public override void SetSelectionPaper() { RPSGame RPSGame = new RPSGame(); RPSGame.SetHumanSelection("Paper"); Assert.AreSame(RPSGame.HumanSelection, "Paper"); }