public void Create_ForInvoked_Instance(
     InitialHeightAndSpeedProviderFactory sut,
     IDeskCommandExecutor executor,
     IDeskHeightAndSpeed heightAndSpeed)
 {
     sut.Create(executor,
                heightAndSpeed)
     .Should( )
     .NotBeNull( );
 }
예제 #2
0
        public IDeskMover Create(IDeskCommandExecutor executor,
                                 IDeskHeightAndSpeed heightAndSpeed)
        {
            Guard.ArgumentNotNull(executor,
                                  nameof(executor));
            Guard.ArgumentNotNull(heightAndSpeed,
                                  nameof(heightAndSpeed));

            return(_factory(executor,
                            heightAndSpeed));
        }
예제 #3
0
        public DeskMover([NotNull] ILogger logger,
                         [NotNull] IScheduler scheduler,
                         [NotNull] IInitialHeightAndSpeedProviderFactory providerFactory,
                         [NotNull] IDeskMovementMonitorFactory monitorFactory,
                         [NotNull] IDeskCommandExecutor executor,
                         [NotNull] IDeskHeightAndSpeed heightAndSpeed,
                         [NotNull] IStoppingHeightCalculator calculator,
                         [NotNull] ISubject <uint> subjectFinished,
                         [NotNull] IDeskHeightMonitor heightMonitor)
        {
            Guard.ArgumentNotNull(logger,
                                  nameof(logger));
            Guard.ArgumentNotNull(scheduler,
                                  nameof(scheduler));
            Guard.ArgumentNotNull(providerFactory,
                                  nameof(providerFactory));
            Guard.ArgumentNotNull(monitorFactory,
                                  nameof(monitorFactory));
            Guard.ArgumentNotNull(executor,
                                  nameof(executor));
            Guard.ArgumentNotNull(heightAndSpeed,
                                  nameof(heightAndSpeed));
            Guard.ArgumentNotNull(calculator,
                                  nameof(calculator));
            Guard.ArgumentNotNull(subjectFinished,
                                  nameof(subjectFinished));
            Guard.ArgumentNotNull(heightMonitor,
                                  nameof(heightMonitor));

            _logger          = logger;
            _scheduler       = scheduler;
            _providerFactory = providerFactory;
            _monitorFactory  = monitorFactory;
            _executor        = executor;
            _heightAndSpeed  = heightAndSpeed;
            _calculator      = calculator;
            _subjectFinished = subjectFinished;
            _heightMonitor   = heightMonitor;
        }
예제 #4
0
        public DeskLocker([NotNull] ILogger logger,
                          [NotNull] IScheduler scheduler,
                          [NotNull] IDeskMover deskMover,
                          [NotNull] IDeskCommandExecutor executer,
                          [NotNull] IDeskHeightAndSpeed heightAndSpeed)
        {
            Guard.ArgumentNotNull(logger,
                                  nameof(logger));
            Guard.ArgumentNotNull(scheduler,
                                  nameof(scheduler));
            Guard.ArgumentNotNull(deskMover,
                                  nameof(deskMover));
            Guard.ArgumentNotNull(executer,
                                  nameof(executer));
            Guard.ArgumentNotNull(heightAndSpeed,
                                  nameof(heightAndSpeed));

            _logger         = logger;
            _scheduler      = scheduler;
            _deskMover      = deskMover;
            _executer       = executer;
            _heightAndSpeed = heightAndSpeed;
        }
        public InitialHeightProvider([NotNull] ILogger logger,
                                     [NotNull] IScheduler scheduler,
                                     [NotNull] IDeskHeightAndSpeed heightAndSpeed,
                                     [NotNull] IDeskCommandExecutor executor,
                                     [NotNull] ISubject <uint> subjectFinished)
        {
            Guard.ArgumentNotNull(logger,
                                  nameof(logger));
            Guard.ArgumentNotNull(scheduler,
                                  nameof(scheduler));
            Guard.ArgumentNotNull(heightAndSpeed,
                                  nameof(heightAndSpeed));
            Guard.ArgumentNotNull(executor,
                                  nameof(executor));
            Guard.ArgumentNotNull(subjectFinished,
                                  nameof(subjectFinished));

            _logger          = logger;
            _scheduler       = scheduler;
            _heightAndSpeed  = heightAndSpeed;
            _executor        = executor;
            _subjectFinished = subjectFinished;
        }
 private IDeskMover TestFactory(IDeskCommandExecutor executor,
                                IDeskHeightAndSpeed heightAndSpeed)
 {
     return(Substitute.For <IDeskMover> ( ));
 }