public void Then_Operation_Was_Sent() { MockControlLine .Received() .SendOperation(Arg.Is <OperationDto>( operation => operation.Device == 2 && operation.Operation == 2 && operation.Params.SequenceEqual(new[] { 120 }) )); MockControlLine .Received(1) .SendOperation(Arg.Any <OperationDto>()); }
public void Then_The_Valid_Operation_Was_Called() { MockControlLine .Received() .SendOperation(Arg.Is <OperationDto>( x => x.Device == 1 && x.Operation == 1 && x.Params.SequenceEqual(new int[] { }) )); MockControlLine .Received(1) .SendOperation(Arg.Any <OperationDto>()); }
protected override void When() { var operationResponse = new OperationResponseDto { Status = _errorCode }; MockControlLine .SendOperation(Arg.Any <OperationDto>()) .Returns(operationResponse); MockErrorService .Validate(Arg.Any <byte>()) .Returns(_moveResult); _result = SUT.MoveAxisAbsolute(new DoorAxis(), 120); }
protected override void When() { var operationResponse = new OperationResponseDto { Status = _errorCode }; MockControlLine .SendOperation(Arg.Any <OperationDto>()) .Returns(operationResponse); MockErrorService .Validate(Arg.Any <byte>()) .Returns(_moveResult); _result = SUT.MoveAxisSearch(new DoorAxis(), new CeilingDigitalSensor(), _direction); }
protected override void When() { var light = new LightAnolougeSensor(); MockControlLine .SendOperation(Arg.Any <OperationDto>()) .Returns(new OperationResponseDto { Status = _status, Returns = 200 }); MockErrorService .Validate(Arg.Any <byte>()) .Returns(_readResult); _result = SUT.Read(light); }