Advertisement
CryptoJones

CarLotMaxSteps.cs

Aug 2nd, 2016
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 KB | None | 0 0
  1. using NUnit.Framework;
  2. using TechTalk.SpecFlow;
  3.  
  4. namespace CarLot.Specs
  5. {
  6.     [Binding]
  7.     public class CarLotMaxSteps
  8.     {
  9.         Program carLotMaxProgram = new Program();
  10.  
  11.         [Given]
  12.         public void GivenIHaveAFullCarlot()
  13.         {
  14.  
  15.             carLotMaxProgram.CarList.Clear();
  16.             for (int i = 0; i < 25; i++)
  17.             {
  18.                 carLotMaxProgram.CreateNewPinto();
  19.             }
  20.             Assert.AreEqual(carLotMaxProgram.CarList.Count, 25);
  21.         }
  22.        
  23.         [When]
  24.         public void WhenITryToAddACar()
  25.         {
  26.             carLotMaxProgram.CreateNewPinto();
  27.         }
  28.        
  29.         [Then]
  30.         public void ThenTheNewCarShouldNotBeAdded()
  31.         {
  32.             Assert.AreEqual(carLotMaxProgram.CarList.Count, 25);
  33.             carLotMaxProgram.CarList.Clear();
  34.         }
  35.  
  36.     }
  37.  
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement