コード例 #1
0
        public void Initialize()
        {
            _uow = A.Fake<IUnitOfWork>();
            _service = new BookingService(_uow);

            _bookingWithPayment = new Booking();
            _bookingWithNoPayments = new Booking();

            //Setting up behaviours
            A.CallTo(() => _uow.BookingRepository.HasPayments(_bookingWithPayment)).Returns(true);
            A.CallTo(() => _uow.BookingRepository.HasPayments(_bookingWithNoPayments)).Returns(false);
        }
コード例 #2
0
 public BookingsController(BookingService service)
 {
     _service = service;
 }