コード例 #1
0
 public Delay(IThreadOperations threadOperations, ITimeService timeService)
 {
     _threadOperations = threadOperations;
     _timeService      = timeService;
     _runCount         = 1;
     RecoveryOptions   = new RecoveryOptionsDto();
 }
 private FakeHardwareComsServer(
     IThreadOperations threadOperations,
     Socket socket, IRequestResponseCollection requestResponseCollection)
 {
     _threadOperations          = threadOperations;
     _socket                    = socket;
     _requestResponseCollection = requestResponseCollection;
 }
コード例 #3
0
 private TcpClient(IPEndPoint endPoint, Socket socket, int packetLength,
                   IThreadOperations threadOperations, int timeout)
 {
     _endPoint         = endPoint;
     _socket           = socket;
     _packetLength     = packetLength;
     _threadOperations = threadOperations;
     _timeout          = timeout;
 }
コード例 #4
0
        public CheckForLightCommand(IValidateOperationService validateOperationService,
                                    IAnalogOperations analogOperations, ILightSensor lightSensor, IThreadOperations threadOperations)
        {
            _validateOperationService = validateOperationService;
            _analogOperations         = analogOperations;
            _lightSensor      = lightSensor;
            _threadOperations = threadOperations;

            RecoveryOptions = new RecoveryOptionsDto(true, Recover);
        }
 public FakeHardwareComsServer(
     IThreadOperations threadOperations, IRequestResponseCollection requestResponseCollection)
     : this(
         threadOperations,
         new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp), requestResponseCollection)
 {
     _socket.Bind(
         ConfigurationLoader
         .GetTestConfigurationLoader()
         .GetControlLineSettings()
         .GetEndPoint()
         );
 }
コード例 #6
0
        protected override void Given()
        {
            MockValidateOperationService = Substitute.For <IValidateOperationService>();
            MockAnalogOperations         = Substitute.For <IAnalogOperations>();
            MockLightSensor         = Substitute.For <ILightSensor>();
            MockThreadingOperations = Substitute.For <IThreadOperations>();

            SUT = new CheckForLightCommand(
                MockValidateOperationService,
                MockAnalogOperations,
                MockLightSensor,
                MockThreadingOperations
                );
        }
コード例 #7
0
 public ParrellelSequence(
     List <IRunnable> tasks,
     RecoveryOptionsDto recoveryOptions,
     Action failAction,
     int runCount,
     IThreadOperations threadOperations
     ) : base(
         tasks,
         recoveryOptions,
         failAction,
         runCount
         )
 {
     _threadOperations = threadOperations;
 }
コード例 #8
0
 public SequenceFactory(IThreadOperations threadOperations)
 {
     _threadOperations = threadOperations;
 }
コード例 #9
0
 public TcpClient(IPEndPoint endPoint, int packetLength, IThreadOperations threadOperations,
                  int timeout) :
     this(endPoint, new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp), packetLength,
          threadOperations, timeout)
 {
 }