Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TodoistClient" /> class.
        /// </summary>
        /// <param name="token">The token.</param>
        /// <param name="restClient">The rest client.</param>
        /// <exception cref="System.ArgumentException">Value cannot be null or empty - token</exception>
        public TodoistClient(string token, ITodoistRestClient restClient)
        {
            if (string.IsNullOrEmpty(token))
            {
                throw new ArgumentException("Value cannot be null or empty.", nameof(token));
            }

            _token      = token;
            _restClient = restClient;

            Projects      = new ProjectsService(this);
            Templates     = new TemplateService(this);
            Items         = new ItemsService(this);
            Labels        = new LabelsService(this);
            Notes         = new NotesService(this);
            Uploads       = new UploadService(this);
            Filters       = new FiltersService(this);
            Activity      = new ActivityService(this);
            Notifications = new NotificationsService(this);
            Backups       = new BackupService(this);
            Reminders     = new RemindersService(this);
            Users         = new UsersService(this);
            Sharing       = new SharingService(this);
            Emails        = new EmailService(this);
            Sections      = new SectionService(this);
        }
Пример #2
0
 public RemindersServiceTests()
 {
     this.repositoryMock      = new Mock <IRemindersRepository>();
     this.utilityServiceMock  = new Mock <IRemindersUtilityService>();
     this.dateTimeServiceMock = new Mock <IDateTimeService>();
     this.uut = new RemindersService(
         this.repositoryMock.Object,
         this.utilityServiceMock.Object,
         this.dateTimeServiceMock.Object);
 }