示例#1
0
 public void Setup()
 {
     _fixture     = new Fixture();
     _timeBuilder = Substitute.For <ITimeBuilder>();
     _context     = new JobTimerDbContext();
     _sut         = new TimerAccess(_context, _timeBuilder);
 }
示例#2
0
        public ChartController(ITimerAccess timerAccess, ITimeBuilder timeBuilder, ITimeGetter timeGetter, IRequestReader requestReader, ITimerCalculator timerCalculator)
        {
            _timerAccess     = timerAccess;
            _timeBuilder     = timeBuilder;
            _timeGetter      = timeGetter;
            _requestReader   = requestReader;
            _timerCalculator = timerCalculator;

            _timeZoneInfo = _timeBuilder.GetTimeZoneInfo(_requestReader.Read(TypeScript.HttpHeaders.Request.CurrentTimeZone));
        }
示例#3
0
        public TimerController(ITimerAccess timerAccess, IRequestReader requestReader, ITimeBuilder timeBuilder, ITimerCalculator timerCalculator, IOvertimeAccess overtimeAccess)
        {
            _timerAccess     = timerAccess;
            _requestReader   = requestReader;
            _timeBuilder     = timeBuilder;
            _timerCalculator = timerCalculator;
            _overtimeAccess  = overtimeAccess;

            _timeZoneInfo = _timeBuilder.GetTimeZoneInfo(_requestReader.Read(HttpHeaders.Request.CurrentTimeZone));
        }
示例#4
0
 public TimerCalculator(ITimerAccess timerAccess, ITimeBuilder timeBuilder)
 {
     _timerAccess = timerAccess;
     _timeBuilder = timeBuilder;
 }
示例#5
0
 public TimerAccess(JobTimerDbContext context, ITimeBuilder timeBuilder)
     : base(context)
 {
     _timeBuilder = timeBuilder;
 }
示例#6
0
 public void SetUp()
 {
     _timerAccess = Substitute.For <ITimerAccess>();
     _timeBuilder = new TimeBuilder(new TimeGetter());
     _sut         = new TimerCalculator(_timerAccess, _timeBuilder);
 }
示例#7
0
 public void Setup()
 {
     _timeGetter = Substitute.For <ITimeGetter>();
     _sut        = new TimeBuilder(_timeGetter);
 }