Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. using NUnit.Framework;
  2.  
  3. namespace Tests
  4. {
  5. public class RPSTest
  6. {
  7. [Test]
  8. public void RPSTest01()
  9. {
  10. Assert.AreEqual(RPSWinner.Draw, RPS.Play(RPSType.Rock, RPSType.Rock), "RPS01 - Rock should draw with Rock");
  11. }
  12. [Test]
  13. public void RPSTest02()
  14. {
  15. Assert.AreEqual(RPSWinner.Right, RPS.Play(RPSType.Rock, RPSType.Paper), "RPS02 - Rock should win from Paper");
  16. }
  17. [Test]
  18. public void RPSTest03()
  19. {
  20. Assert.AreEqual(RPSWinner.Left, RPS.Play(RPSType.Rock, RPSType.Scissors), "RPS03 - Rock should lose from Scissors");
  21. }
  22. [Test]
  23. public void RPSTest04()
  24. {
  25. Assert.AreEqual(RPSWinner.Left, RPS.Play(RPSType.Paper, RPSType.Rock), "RPS04 - Paper should win from Rock");
  26. }
  27. [Test]
  28. public void RPSTest05()
  29. {
  30. Assert.AreEqual(RPSWinner.Draw, RPS.Play(RPSType.Paper, RPSType.Paper), "RPS05 - Paper should draw with Paper");
  31. }
  32. [Test]
  33. public void RPSTest06()
  34. {
  35. Assert.AreEqual(RPSWinner.Right, RPS.Play(RPSType.Paper, RPSType.Scissors), "RPS06 - Paper should lose from Scissors");
  36. }
  37. [Test]
  38. public void RPSTest07()
  39. {
  40. Assert.AreEqual(RPSWinner.Right, RPS.Play(RPSType.Scissors, RPSType.Rock), "RPS07 - Scissors should lose from Rock");
  41. }
  42. [Test]
  43. public void RPSTest08()
  44. {
  45. Assert.AreEqual(RPSWinner.Left, RPS.Play(RPSType.Scissors, RPSType.Paper), "RPS08 - Scissors should win from Paper");
  46. }
  47. [Test]
  48. public void RPSTest09()
  49. {
  50. Assert.AreEqual(RPSWinner.Draw, RPS.Play(RPSType.Scissors, RPSType.Scissors), "RPS09 - Scissors should draw with Scissors");
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement