public void ThrowWhenFilmSCreeningsServiceHasNullValue() { IFilmScreeningService nullScreeningService = null; Assert.That( () => new Presenters.FilmScreeningPresenters.GetFilmScreeningsPresenter(nullScreeningService), Throws.InstanceOf <ArgumentNullException>()); }
public PaymentPresenter(IFilmScreeningService screeningService, ISeatService seatService) { Guard.WhenArgument(screeningService, "screeningService").IsNull().Throw(); Guard.WhenArgument(seatService, "seatService").IsNull().Throw(); this.screeningService = screeningService; this.seatService = seatService; }
public void ThrowWnehFilmScreeningServiceHasNullValue() { IFilmScreeningService nullScreeningService = null; var mockedSeatService = new Mock <ISeatService>(); Assert.That( () => new Presenters.PaymentPresenters.PaymentPresenter( nullScreeningService, mockedSeatService.Object), Throws.InstanceOf <ArgumentNullException>()); }
public AddFilmScreeningPresenter( IFilmScreeningService screeningService, IMoviesService moviesService, INavigationService navigationService) { Guard.WhenArgument(screeningService, "screeningService").IsNull().Throw(); Guard.WhenArgument(moviesService, "moviesService").IsNull().Throw(); Guard.WhenArgument(navigationService, "navigationService").IsNull().Throw(); this.screeningService = screeningService; this.moviesService = moviesService; this.navigationService = navigationService; }
public void ThrowWhenFilmScreeningServiceHasNullValue() { var mockedMoviesService = new Mock <IMoviesService>(); IFilmScreeningService nullScreeningService = null; var mockedNavigationService = new Mock <INavigationService>(); Assert.That( () => new Presenters.FilmScreeningPresenters.AddFilmScreeningPresenter( nullScreeningService, mockedMoviesService.Object, mockedNavigationService.Object), Throws.InstanceOf <ArgumentNullException>()); }
public UpdateFilmScreeningPresenter(IFilmScreeningService screeningService) { Guard.WhenArgument(screeningService, "screeningService").IsNull().Throw(); this.screeningService = screeningService; }