Exemplo n.º 1
0
 public void Then_returns_the_product_of_the_split_returned_by_gillian()
 {
     var fake = new Fake(new SplitPair { X=-3, Y=-2});
       var game = new Game(fake.Split);
       Assert.That(game.Go(0), Is.EqualTo(6));
 }
Exemplo n.º 2
0
 public void Then_gillian_should_split_the_number()
 {
     var fake = new Fake();
       var game = new Game(fake.Split);
       game.Go(4);
       Assert.IsTrue(fake.WasCalled);
 }
Exemplo n.º 3
0
 public void Then_gillian_should_split_4()
 {
     var fake = new Fake();
       var game = new Game(fake.Split);
       game.Go(4);
       Assert.That(fake.CalledNumber, Is.EqualTo(4));
 }
Exemplo n.º 4
0
 public void Given_that_a_split_with_a_number_higher_than_2_was_done_before()
 {
     _fake = new FakeWithGillian(Gillian.Split);
       var game = new Game(_fake.Split);
       game.Go(3);
 }
Exemplo n.º 5
0
 public void Then_the_split_is_called_4_times()
 {
     var fake = new FakeWithGillian(Gillian.Split);
       var game = new Game(fake.Split);
       game.Go(5);
       Assert.That(fake.NumberOfCalls, Is.EqualTo(4));
 }
Exemplo n.º 6
0
 public void Then_the_sum_of_the_product_of_the_first_and_second_split_is_returned()
 {
     var game = new Game(Gillian.Split);
       Assert.That(game.Go(3), Is.EqualTo(2 * 1 + 1 * 1));
 }