public UnpublishLogbookEntryInteractor(
     [NotNull] ILogger <UnpublishLogbookEntryInteractor> logger,
     [NotNull] ILogbookEntryRepository dataAccess)
 {
     this.dataAccess = dataAccess ?? throw new ArgumentNullException(nameof(dataAccess));
     this.logger     = logger ?? throw new ArgumentNullException(nameof(logger));
 }
        public PublishLogEntryInteractorTests()
        {
            var logger = A.Fake <ILogger <PublishLogbookEntryInteractor> >();

            dataAccess = A.Fake <ILogbookEntryRepository>();
            publishLogbookEntryInteractor = new PublishLogbookEntryInteractor(logger, dataAccess);
        }
 public DeleteLogbookEntryInteractor(
     [NotNull] ILogger <DeleteLogbookEntryInteractor> logger,
     [NotNull] ILogbookEntryRepository repository)
 {
     this.logger     = logger ?? throw new ArgumentNullException(nameof(logger));
     this.repository = repository ?? throw new ArgumentNullException(nameof(repository));
 }
 public ListAllLogbookEntriesInteractor(
     [NotNull] ILogbookEntryRepository logbookEntryRepository,
     [NotNull] ICurrentUser currentUser)
 {
     this.logbookEntryRepository = logbookEntryRepository ?? throw new ArgumentNullException(nameof(logbookEntryRepository));
     this.currentUser            = currentUser ?? throw new ArgumentNullException(nameof(currentUser));
 }
Exemple #5
0
 public NotificationPublisher(
     [NotNull] IEventRepository eventRepository,
     [NotNull] ILogbookEntryRepository logbookEntryRepository,
     [NotNull] INotificationRepository notificationRepository)
 {
     this.eventRepository        = eventRepository ?? throw new ArgumentNullException(nameof(eventRepository));
     this.logbookEntryRepository = logbookEntryRepository ?? throw new ArgumentNullException(nameof(logbookEntryRepository));
     this.notificationRepository = notificationRepository ?? throw new ArgumentNullException(nameof(notificationRepository));
 }
 public PublishNewLogbookEntryNotificationPolicy(
     [NotNull] IDiverRepository diverRepository,
     [NotNull] ILogbookEntryRepository logbookEntryRepository,
     [NotNull] INotificationPublisher notificationPublisher)
 {
     this.diverRepository        = diverRepository ?? throw new ArgumentNullException(nameof(diverRepository));
     this.logbookEntryRepository = logbookEntryRepository ?? throw new ArgumentNullException(nameof(logbookEntryRepository));
     this.notificationPublisher  = notificationPublisher ?? throw new ArgumentNullException(nameof(notificationPublisher));
 }
 public GetLogbookEntryDetailsInteractor(
     [NotNull] ILogger <GetLogbookEntryDetailsInteractor> logger,
     [NotNull] ILogbookEntryRepository repository,
     [NotNull] ICurrentUser currentUser)
 {
     this.logger      = logger ?? throw new ArgumentNullException(nameof(logger));
     this.repository  = repository ?? throw new ArgumentNullException(nameof(repository));
     this.currentUser = currentUser ?? throw new ArgumentNullException(nameof(currentUser));
 }
 public NewLogbookEntryInteractor(
     [NotNull] ILogger <NewLogbookEntryInteractor> logger,
     [NotNull] ILogbookEntryRepository repository,
     [NotNull] IPhotoService photoService,
     [NotNull] ICurrentUser currentUser)
 {
     this.logger       = logger ?? throw new ArgumentNullException(nameof(logger));
     this.repository   = repository ?? throw new ArgumentNullException(nameof(repository));
     this.photoService = photoService ?? throw new ArgumentNullException(nameof(photoService));
     this.currentUser  = currentUser ?? throw new ArgumentNullException(nameof(currentUser));
 }
Exemple #9
0
        public UnpublishLogbookEntryInteractorTests()
        {
            var logger = A.Fake <ILogger <UnpublishLogbookEntryInteractor> >();

            repository = A.Fake <ILogbookEntryRepository>();
            A.CallTo(() => repository.FindByIdAsync(A <Guid> ._))
            .ReturnsLazily(call => Task.FromResult(
                               (Guid)call.Arguments[0] == validLogbookEntryId
                        ? new LogbookEntry {
                Id = validLogbookEntryId, Title = "TheTitle"
            }
                        : null
                               ));

            interactor = new UnpublishLogbookEntryInteractor(logger, repository);
        }
 public SummaryListLogbookEntriesInteractor([NotNull] ILogbookEntryRepository logbookEntryRepository)
 {
     this.logbookEntryRepository = logbookEntryRepository ?? throw new ArgumentNullException(nameof(logbookEntryRepository));
 }