Example #1
0
        public void ReturnIQueryableFilmScreeningCollection()
        {
            var mockedScreeningService = new Mock <IFilmScreeningService>();
            var mockedSeatService      = new Mock <ISeatService>();

            var actualPaymentPresenter =
                new Presenters.PaymentPresenters.PaymentPresenter(mockedScreeningService.Object, mockedSeatService.Object);

            var result = actualPaymentPresenter.GetAllFutureScreenings();

            Assert.That(result, Is.Not.Null.And.InstanceOf <IQueryable <FilmScreening> >());
        }
Example #2
0
        public void CallScreeningServiceGetAllFutureScreeningsMethod()
        {
            var mockedScreeningService = new Mock <IFilmScreeningService>();
            var mockedSeatService      = new Mock <ISeatService>();

            var actualPaymentPresenter =
                new Presenters.PaymentPresenters.PaymentPresenter(mockedScreeningService.Object, mockedSeatService.Object);

            actualPaymentPresenter.GetAllFutureScreenings();

            mockedScreeningService.Verify(service => service.GetAllFutureScreenings(), Times.Once);
        }