public void GivenIAmOnTheBuyTicketPage() { controller = Container.GetInstance<BuyTicketsController>(); }
public void GivenPurchasingIsBroken() { var boxOffice = Substitute.For<IBoxOffice>(); boxOffice.When(b => b.SellTickets(Arg.Any<int>(), Arg.Any<int>(), Arg.Any<int>())) .Do(x => { throw new Exception(); }); Container.EjectAllInstancesOf<IBoxOffice>(); Container.Inject(typeof(IBoxOffice), boxOffice); controller = Container.GetInstance<BuyTicketsController>(); }