Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using NUnit.Framework;
- namespace Tests
- {
- public class RPSTest
- {
- [Test]
- public void RPSTest01()
- {
- Assert.AreEqual(RPSWinner.Draw, RPS.Play(RPSType.Rock, RPSType.Rock), "RPS01 - Rock should draw with Rock");
- }
- [Test]
- public void RPSTest02()
- {
- Assert.AreEqual(RPSWinner.Right, RPS.Play(RPSType.Rock, RPSType.Paper), "RPS02 - Rock should win from Paper");
- }
- [Test]
- public void RPSTest03()
- {
- Assert.AreEqual(RPSWinner.Left, RPS.Play(RPSType.Rock, RPSType.Scissors), "RPS03 - Rock should lose from Scissors");
- }
- [Test]
- public void RPSTest04()
- {
- Assert.AreEqual(RPSWinner.Left, RPS.Play(RPSType.Paper, RPSType.Rock), "RPS04 - Paper should win from Rock");
- }
- [Test]
- public void RPSTest05()
- {
- Assert.AreEqual(RPSWinner.Draw, RPS.Play(RPSType.Paper, RPSType.Paper), "RPS05 - Paper should draw with Paper");
- }
- [Test]
- public void RPSTest06()
- {
- Assert.AreEqual(RPSWinner.Right, RPS.Play(RPSType.Paper, RPSType.Scissors), "RPS06 - Paper should lose from Scissors");
- }
- [Test]
- public void RPSTest07()
- {
- Assert.AreEqual(RPSWinner.Right, RPS.Play(RPSType.Scissors, RPSType.Rock), "RPS07 - Scissors should lose from Rock");
- }
- [Test]
- public void RPSTest08()
- {
- Assert.AreEqual(RPSWinner.Left, RPS.Play(RPSType.Scissors, RPSType.Paper), "RPS08 - Scissors should win from Paper");
- }
- [Test]
- public void RPSTest09()
- {
- Assert.AreEqual(RPSWinner.Draw, RPS.Play(RPSType.Scissors, RPSType.Scissors), "RPS09 - Scissors should draw with Scissors");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement