Esempio n. 1
0
 public void Passing_more_than_one_object()
 {
     new Behaviour()
         .Given(_air = new Air(), _baloon = new Baloon(_air))
         .Then(_baloon.State == Baloon.InflationState.Inflated)
         ;
 }
Esempio n. 2
0
 public void Passing_an_object_as_argument()
 {
     new Behaviour()
         .Given(_baloon = new Baloon())
         .When(() => _baloon.Pop())
         .Then(_baloon.State == Baloon.InflationState.Popped);
 }
Esempio n. 3
0
 public void Passing_Arbitrary_objects()
 {
     new Behaviour()
         .Given(1 == 1)
         .AndGiven(_bool = 1 == 2)
         .AndGiven(_air = new Air(), _baloon = new Baloon(_air))
         .Then(_bool == false);
 }
 public void Passing_Arbitrary_objects()
 {
     new ExceptionBehaviour()
         .Given(_air = new Air())
         .AndGiven(_baloon = new Baloon(_air))
         .When(() => _baloon.Inflate())
         .AnExceptionOfType(typeof(AlreadyInflatedException))
         .IsThrownWithMessage("The baloon is already inflated");
 }