SHARE
TWEET

Untitled

a guest Jun 17th, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using NUnit.Framework;
  2.  
  3. namespace TennisGame.UnitTests.Ultimate_Simplified__imo__TestCase
  4. {
  5.     [TestFixture]
  6.     class TennisGameTestCase : TennisGameTest
  7.     {
  8.             // 0 - zero
  9.             // 1 - fifteen
  10.             // 2 - thirty
  11.             // 3 - forty
  12.             // 4 - advantage
  13.  
  14.             [TestCase(0, 0, "0:15")]
  15.             [TestCase(0, 1, "0:30")]
  16.             [TestCase(0, 2, "0:40")]
  17.             [TestCase(0, 3, "0:W")]
  18.             [TestCase(1, 0, "15:15")]
  19.             [TestCase(1, 1, "15:30")]
  20.             [TestCase(1, 2, "15:40")]
  21.             [TestCase(1, 3, "15:W")]
  22.             [TestCase(2, 0, "30:15")]
  23.             [TestCase(2, 1, "30:30")]
  24.             [TestCase(2, 2, "30:40")]
  25.             [TestCase(2, 3, "30:W")]
  26.             [TestCase(3, 0, "40:15")]
  27.             [TestCase(3, 1, "40:30")]
  28.             [TestCase(3, 2, "40:40")]
  29.             [TestCase(3, 3, "40:A")]
  30.             [TestCase(3, 4, "40:W")]
  31.             [TestCase(4, 3, "40:40")]
  32.             public void ReceiverWinsAPointScenario(int server, int receiver, string expection)
  33.             {
  34.                 GivenTheScoreIs((Score) server, (Score) receiver);
  35.  
  36.                 WhenTheReceiverWinsAPoint();
  37.  
  38.                 Assert.That(expection, Is.EqualTo(ScoreOutput));
  39.  
  40.             }
  41.  
  42.             [TestCase(0, 0, "15:0")]
  43.             [TestCase(0, 1, "15:15")]
  44.             [TestCase(0, 2, "15:30")]
  45.             [TestCase(0, 3, "15:40")]
  46.             [TestCase(1, 0, "30:0")]
  47.             [TestCase(1, 1, "30:15")]
  48.             [TestCase(1, 2, "30:30")]
  49.             [TestCase(1, 3, "30:40")]
  50.             [TestCase(2, 0, "40:0")]
  51.             [TestCase(2, 1, "40:15")]
  52.             [TestCase(2, 2, "40:30")]
  53.             [TestCase(2, 3, "40:40")]
  54.             [TestCase(3, 0, "W:0")]
  55.             [TestCase(3, 1, "W:15")]
  56.             [TestCase(3, 2, "W:30")]
  57.             [TestCase(3, 3, "A:40")]
  58.             [TestCase(3, 4, "40:40")]
  59.             [TestCase(4, 3, "W:40")]
  60.             public void ServerWinsAPointScenario(int server, int receiver, string expection)
  61.             {
  62.                 GivenTheScoreIs((Score) server, (Score) receiver);
  63.  
  64.                 WhenTheServerWinsAPoint();
  65.  
  66.                 Assert.That(expection, Is.EqualTo(ScoreOutput));
  67.  
  68.             }
  69.  
  70.  
  71.     }
  72.  
  73. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top