Advertisement
CryptoJones

FunnyCarSteps.cs

Aug 2nd, 2016
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. using NUnit.Framework;
  2. using TechTalk.SpecFlow;
  3.  
  4. namespace CarLot.Specs
  5. {
  6.     [Binding]
  7.     public class FunnyCarSteps {
  8.         Program p = new Program();
  9.  
  10.         [Given]
  11.         public void GivenIHaveANewFunnyCar()
  12.         {
  13.             p.CreateNewFunnyCar();
  14.         }
  15.  
  16.         [Then]
  17.         public void ThenItsFuelTypeShouldBeMethanol()
  18.         {
  19.             Assert.IsTrue(p.CarList[0].fuelType == Program.FuelType.Methanol);
  20.         }
  21.         [Then]
  22.         public void ThenIDriveIt()
  23.         {
  24.             p.CarList[0].Drive();
  25.         }
  26.  
  27.         [Then]
  28.         public void ThenTheTankShouldBeEmpty()
  29.         {
  30.             Assert.IsTrue(p.CarList[0].fuelLevel == 0);
  31.             p.CarList.Clear();
  32.  
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement