Пример #1
0
 public DateController(IDateValidation dateValidation, IDateParser dateParser, ICalculateDateRange calculateDateRange, DateView view)
 {
     _dateValidation     = dateValidation;
     _dateParser         = dateParser;
     _calculateDateRange = calculateDateRange;
     _view = view;
 }
Пример #2
0
        public void OfficerDataMapper_ConstructorParameterDataParserIsNotNull_ReturnsOfficerDataMapper()
        {
            IDateParser fakeDateParser = NSubstitute.Substitute.For <IDateParser>();

            var officerDataMapper = new OfficerDataMapper(fakeDateParser);

            Assert.NotNull(officerDataMapper);
        }
 public ConsoleAppService(
     IDateParser dateParser,
     IDaySummaryService daySummaryService,
     ITagFormatter tagFormatter,
     IAppOutput appOutput)
 {
     _dateParser        = dateParser ?? throw new ArgumentNullException(nameof(dateParser));
     _daySummaryService = daySummaryService ?? throw new ArgumentNullException(nameof(daySummaryService));
     _tagFormatter      = tagFormatter ?? throw new ArgumentNullException(nameof(tagFormatter));
     _appOutput         = appOutput ?? throw new ArgumentNullException(nameof(appOutput));
 }
        public StudentCalendarPresenter(IStudentCalendarView view, IStudentService studentService, IDateParser dateParser)
            : base(view)
        {
            Validator.ValidateForNull(studentService, "studentService");
            Validator.ValidateForNull(dateParser, "dateParser");

            this.studentService = studentService;
            this.dateParser     = dateParser;

            this.View.LoadLectures += View_LoadLectures;
        }
        public ChildLecturesPresenter(IChildLecturesView view, IParentService parentService, IStudentService studentService, IDateParser dateParser)
            : base(view)
        {
            Validator.ValidateForNull(parentService, "parentService");
            Validator.ValidateForNull(studentService, "studentService");
            Validator.ValidateForNull(dateParser, "dateParser");

            this.parentService  = parentService;
            this.studentService = studentService;
            this.dateParser     = dateParser;

            this.View.PageLoad     += View_PageLoad;
            this.View.LoadLectures += View_LoadLectures;
        }
Пример #6
0
        public AddNewLecturePresenter(IAddNewLectureView view, ITeacherService teacherService, ILectureService lectureService, IStudentClassService studentClassService, ILectureFactory lectureFactory, IDateParser dateParser)
            : base(view)
        {
            Validator.ValidateForNull(teacherService, "teacherService");
            Validator.ValidateForNull(lectureService, "lectureService");
            Validator.ValidateForNull(studentClassService, "studentClassService");
            Validator.ValidateForNull(lectureFactory, "lectureFactory");
            Validator.ValidateForNull(dateParser, "dateParser");

            this.teacherService      = teacherService;
            this.lectureService      = lectureService;
            this.studentClassService = studentClassService;
            this.lectureFactory      = lectureFactory;
            this.dateParser          = dateParser;

            this.View.PageLoad        += View_PageLoad;
            this.View.AddLectureClick += View_AddLectureClick;
        }
Пример #7
0
        public HttpCacheHeaderWithExclusionsMiddleware(
            RequestDelegate next,
            ILoggerFactory loggerFactory,
            IDateParser dateParser,
            IValidatorValueStore store,
            IStoreKeyGenerator storeKeyGenerator,
            IETagGenerator eTagGenerator,
            ILastModifiedInjector lastModifiedInjector,
            IOptions <ExpirationModelOptions> expirationModelOptions,
            IOptions <ValidationModelOptions> validationModelOptions,
            IOptions <ExcludedRouteModelOptions> excludedRouteModelOptions)
        {
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            if (validationModelOptions == null)
            {
                throw new ArgumentNullException(nameof(validationModelOptions));
            }

            if (expirationModelOptions == null)
            {
                throw new ArgumentNullException(nameof(expirationModelOptions));
            }

            _next = next ?? throw new ArgumentNullException(nameof(next));

            _dateParser           = dateParser ?? throw new ArgumentNullException(nameof(dateParser));
            _store                = store ?? throw new ArgumentNullException(nameof(store));
            _storeKeyGenerator    = storeKeyGenerator ?? throw new ArgumentNullException(nameof(storeKeyGenerator));
            _eTagGenerator        = eTagGenerator ?? throw new ArgumentNullException(nameof(eTagGenerator));
            _lastModifiedInjector =
                lastModifiedInjector ?? throw new ArgumentNullException(nameof(lastModifiedInjector));

            _expirationModelOptions    = expirationModelOptions.Value;
            _validationModelOptions    = validationModelOptions.Value;
            _excludedRouteModelOptions = excludedRouteModelOptions.Value;

            _logger = loggerFactory.CreateLogger <HttpCacheHeadersMiddleware>();
        }
Пример #8
0
        public Engine(IInvoiceParser invParser, IDecimalParser decParser, IDateParser dateParser, IReader reader, IDocWriter writer, string docTemplatePath, string saveNameTemplate, string company)
        {
            Guard.WhenArgument(invParser, "invParser").IsNull().Throw();
            Guard.WhenArgument(decParser, "decParser").IsNull().Throw();
            Guard.WhenArgument(dateParser, "dateParser").IsNull().Throw();
            Guard.WhenArgument(reader, "reader").IsNull().Throw();
            Guard.WhenArgument(writer, "writer").IsNull().Throw();
            Guard.WhenArgument(docTemplatePath, "docTemplatePath").IsNullOrWhiteSpace().Throw();
            Guard.WhenArgument(saveNameTemplate, "saveNameTemplate").IsNullOrWhiteSpace().Throw();
            Guard.WhenArgument(company, "company").IsNullOrWhiteSpace().Throw();

            this.invParser        = invParser;
            this.decParser        = decParser;
            this.reader           = reader;
            this.writer           = writer;
            this.DocTemplatePath  = docTemplatePath;
            this.saveNameTemplate = saveNameTemplate;
            this.dateParser       = dateParser;
            this.company          = company;
        }
Пример #9
0
 public FilterVisitor(IDateParser dateParser)
 {
     _parameter = Expression.Parameter(typeof(T));
     _dateParser = dateParser;
 }
 public FlatFileMusicContractRepository(IInputData inputInputData, IDateParser dateParser)
 {
     _inputData  = inputInputData;
     _dateParser = dateParser;
 }
Пример #11
0
 public ArgumentParser(IDateParser dateParser)
 {
     _dateParser = dateParser;
 }
Пример #12
0
        public void OfficerDataMapper_ConstructorParameterDataParserIsNull_ReturnsException()
        {
            IDateParser fakeDateParser = null;

            Assert.Throws <ArgumentNullException>(() => new OfficerDataMapper(fakeDateParser));
        }
Пример #13
0
 public TranscriptParser(IDateParser dateParser)
 {
     _dateParser = dateParser;
 }
Пример #14
0
 public OfficerDataMapper(IDateParser dateParser)
 {
     this.dateParser = dateParser ?? throw new ArgumentNullException(nameof(dateParser));
 }
Пример #15
0
 public FeedService(IHttpDownload httpDownload, IDateParser dateParser)
 {
     _httpDownload = httpDownload;
     _dateParser   = dateParser;
 }
Пример #16
0
 public DateParserTest()
 {
     _sut = new DateParser();
 }