public ConsumerSpecificationsDataProvider(ICollection<IPointToLaceRequest> request, IExecuteTheDataProviderSource nextSource,
     IExecuteTheDataProviderSource fallbackSource, ISendCommandToBus command)
     : base(nextSource, fallbackSource)
 {
     _request = request;
     _command = command;
 }
 public when_consuming_rgt_vin_with_vin12_vin_number()
 {
     _command = MonitoringBusBuilder.ForRgtVinCommands(Guid.NewGuid());
     _vin12Commands = MonitoringBusBuilder.ForVin12Commands(Guid.NewGuid());
     _request = new[] { new RgtVin12Request() };
     _response = new Collection<IPointToLaceProvider>();
 }
 public when_initializing_lace_handlers_for_ivid_title_holder_with_absa_financed_interest()
 {
     _command = MonitoringBusBuilder.ForIvidTitleHolderCommands(Guid.NewGuid());
     _request = new LicensePlateRequestBuilder().ForIvidTitleHolderWithAbsaFinancedInterest();
     _response = new LaceResponseBuilder().WithIvidResponseAndFinancedInterestVin();
     _dataProvider = new IvidTitleHolderDataProvider(_request, null, null, _command);
 }
 public when_requesting_data_from_lightsone_business_compan_source()
 {
     _command = MonitoringBusBuilder.ForLightstoneCompanyCommands(Guid.NewGuid());
     _requestDataFromService = new RequestDataFromLightstoneCompany();
     _response = new Collection<IPointToLaceProvider>();
     _externalWebServiceCall = new FakeCallingLightstoneBusinessCompanyExternalWebService();
 }
 public FakeIvidTitleHolderSourceExecution(ICollection<IPointToLaceRequest> request, IExecuteTheDataProviderSource nextSource,
     IExecuteTheDataProviderSource fallbackSource, ISendCommandToBus command)
     : base(nextSource, fallbackSource)
 {
     _request = request;
     _command = command;
 }
 public when_initializing_lace_handlers_for_lightstone()
 {
     _command = MonitoringBusBuilder.ForLightstoneCommands(Guid.NewGuid());
     _request = new LicensePlateRequestBuilder().ForLightstoneLicensePlate();
     _response = new LaceResponseBuilder().WithIvidResponseHandled();
     _dataProvider = new LightstoneAutoDataProvider(_request, null, null, _command);
 }
 public when_consuming_lighstone_auto_with_vin12_vin_number()
 {
     _command = MonitoringBusBuilder.ForLightstoneCommands(Guid.NewGuid());
     _vin12Commands = MonitoringBusBuilder.ForVin12Commands(Guid.NewGuid());
     _request = new[] {new LighstoneAutoVin12Request()};
     _response = new Collection<IPointToLaceProvider>();
 }
 public when_initializing_lace_handlers_for_Lightstone_business_director_request()
 {
     _command = MonitoringBusBuilder.ForLightstoneDirectorCommands(Guid.NewGuid());
     _request = new DirectorRequestBuilder().ForLightstoneDirector();
     _response = new Collection<IPointToLaceProvider>();
     _dataProvider = new LightstoneDirectorDataProvider(_request, null, null, _command);
 }
 public LightstoneAutoDataProvider(ICollection<IPointToLaceRequest> request, IExecuteTheDataProviderSource nextSource,
     IExecuteTheDataProviderSource fallbackSource, ISendCommandToBus command)
     : base(nextSource, fallbackSource)
 {
     _request = request;
     _command = command;
 }
 public when_initializing_lace_handlers_for_audatex_request()
 {
     _command = MonitoringBusBuilder.ForAudatexCommands(Guid.NewGuid());
     _request = new LicensePlateRequestBuilder().ForAudatex();
     _response = new LaceResponseBuilder().WithIvidResponseHandled();
   //  _dataProvider = new AudatexDataProvider(_request, null, null,_command);
 }
 public when_initializing_lace_handlers_for_signio_drivers_license_decryption()
 {
     _command = MonitoringBusBuilder.ForSignioDriversLicenseCommands(Guid.NewGuid());
     _request = new DriversLicenseRequestBuilder().ForDriversLicenseScan();
     _response = new Collection<IPointToLaceProvider>();
     _dataProvider = new SignioDataProvider(_request, null, null, _command);
 }
 public when_initializing_lace_handlers_for_rgt_vin()
 {
     _command = MonitoringBusBuilder.ForRgtVinCommands(Guid.NewGuid());
     _request = new LicensePlateRequestBuilder().ForRgtVin();
     _response = new LaceResponseBuilder().WithIvidResponseHandled();
     _dataProvider = new RgtVinDataProvider(_request, null, null, _command);
 }
 public when_initializing_lace_handlers_for_ivid_title_holder()
 {
     _command = MonitoringBusBuilder.ForIvidTitleHolderCommands(Guid.NewGuid());
     _request = new LicensePlateRequestBuilder().ForIvidTitleHolder();
     _response = new LaceResponseBuilder().WithIvidResponseHandled();
     _dataProvider = new IvidTitleHolderDataProvider(_request, null, null,_command);
 }
 public when_initializing_lace_handlers_for_mmcode_with_carid()
 {
     _command = MonitoringBusBuilder.ForRgtCommands(Guid.NewGuid());
     _request = new LicensePlateRequestBuilder().ForMmCode();
     _response = new Collection<IPointToLaceProvider>();
     _dataProvider = new MmCodeDataProvider(_request, null, null, _command);
 }
 public RgtVinDataProvider(ICollection<IPointToLaceRequest> request, IExecuteTheDataProviderSource nextSource,
     IExecuteTheDataProviderSource fallbackSource, ISendCommandToBus command)
     : base(nextSource, fallbackSource)
 {
     _request = request;
     _handleServiceCall = new FakeHandleRgtVinServiceCall();
     _externalWebServiceCall = new FakeCallingRgtVinExternalWebService();
     _command = command;
 }
 private LogCommandTypes(ISendCommandToBus commands, DataProviderCommandSource dataProviderName,DataProviderNoRecordState billNoRecords)
 {
     _commands = commands;
     _dataProviderName = dataProviderName;
     _log = LogManager.GetLogger(GetType());
     _executeWatch = new StopWatchFactory().StopWatchForDataProvider(_dataProviderName);
     _requestWatch = new StopWatchFactory().StopWatchForDataProvider(_dataProviderName);
     _billNoRecords = billNoRecords;
 }
        public when_initializing_lace_handlers_for_Lightstone_property_request()
        {
            _command = MonitoringBusBuilder.ForLightstonePropertyCommands(Guid.NewGuid());
            var lspRequestBuilder = new LspRequestBuilder();

            _request = lspRequestBuilder.ForReturnProperties();
            _response = new Collection<IPointToLaceProvider>();
            _dataProvider = new LightstonePropertyDataProvider(_request, null, null, _command);
        }
 public when_response_has_a_technical_failure()
 {
     _command = MonitoringBusBuilder.ForLightstoneCommands(Guid.NewGuid());
     _request = new LicensePlateRequestBuilder().ForLightstoneLicensePlate();
     var ividResponse = IvidResponse.WithState(DataProviderResponseState.TechnicalError);
     ividResponse.HasBeenHandled();
     _response = new Collection<IPointToLaceProvider>()
     {
         ividResponse
     }; 
     _dataProvider = new LightstoneAutoDataProvider(_request, null, null, _command);
 }
 public when_previous_response_has_no_records_and_this_response_has_no_records()
 {
     _command = MonitoringBusBuilder.ForLightstoneCommands(Guid.NewGuid());
     _request = new LicensePlateRequestBuilder().ForLightstoneLicensePlate();
     var ividResponse = IvidResponse.WithState(DataProviderResponseState.NoRecords);
     ividResponse.HasBeenHandled();
     _response = new Collection<IPointToLaceProvider>()
     {
         ividResponse
     }; 
     _dataProvider = new LightstoneAutoDataProvider(_request, null, null, _command);
 }
        public when_requesting_data_from_lightstone_source()
        {
            _command = MonitoringBusBuilder.ForLightstoneCommands(Guid.NewGuid());
            _requestDataFromSource = new RequestDataFromLightstoneAuto();
            _request = new LicensePlateRequestBuilder().ForLightstoneVinNumber();
            _response = new Collection<IPointToLaceProvider>();

            _dataProvider = _request.GetFromRequest<IPointToLaceRequest>()
                .Package.DataProviders.Single(w => w.Name == DataProviderName.LSAutoCarStats_I_DB);
            _logCommand = LogCommandTypes.ForDataProvider(_command, DataProviderCommandSource.LSAutoCarStats_I_DB, _dataProvider, DataProviderNoRecordState.NonBillable);

            _callTheSource = new CallLightstoneAutoDataProvider(_dataProvider, new FakeDataProviderRepository(), _logCommand);
        }
        public when_both_responses_are_successfull_response_state()
        {
            _command = MonitoringBusBuilder.ForLightstoneCommands(Guid.NewGuid());
            _request = new LicensePlateRequestBuilder().ForLightstoneLicensePlate();
            var ividResponse = IvidResponse.WithState(DataProviderResponseState.Successful);
            ividResponse.HasBeenHandled();

            var lightstoneResponse = LightstoneAutoResponse.WithState(DataProviderResponseState.Successful);
            lightstoneResponse.HasBeenHandled();

            _response = new Collection<IPointToLaceProvider>()
            {
                ividResponse,
                lightstoneResponse
            };
            _dataProvider = new LightstoneAutoDataProvider(_request, null, null, _command);
        }
 public when_consuming_bmw_finance_with_account_number()
 {
     _command = MonitoringBusBuilder.ForLightstoneCommands(Guid.NewGuid());
     _request = new[] { new BmwFinanceRequestWithAccountNumber(),  };
     _response = new Collection<IPointToLaceProvider>();
 }
 public when_consuming_vin12_data_provider()
 {
     _command = MonitoringBusBuilder.ForVin12Commands(Guid.NewGuid());
     _request = new[] { new Vin12Request() };
     _response = new Collection<IPointToLaceProvider>();
 }
 public when_executing_request_with_errors_for_lightstone()
 {
     _command = MonitoringBusBuilder.ForLightstoneCommands(Guid.NewGuid());
 }
 public when_consuming_lightstone_data_provider_with_car_id()
 {
     _command = MonitoringBusBuilder.ForLightstoneCommands(Guid.NewGuid());
     _request = new[] {new CarIdLightstoneOnlyRequest()};
     _response = new Collection<IPointToLaceProvider>();
 }
 public when_consuming_ivid_data_provider()
 {
     _command = MonitoringBusBuilder.ForIvidCommands(Guid.NewGuid());
     _request = new[] {new LicensePlateNumberIvidOnlyRequest()};
     _response = new Collection<IPointToLaceProvider>();
 }
      //  private AudatexDataProvider _consumer;


        public when_consuming_audatex_data_provider()
        {
            _command = MonitoringBusBuilder.ForAudatexCommands(Guid.NewGuid());
            _request = new[] {new LicensePlateNumberAudatexOnlyRequest()};
            _response = new LaceResponseBuilder().WithIvidResponseHandledAndVin12();
        }
 public when_consuming_lightstone_business_director_data_provider()
 {
     _command = MonitoringBusBuilder.ForLightstoneDirectorCommands(Guid.NewGuid());
     _request = new[] {new DirectorRequest(), };
     _response = new Collection<IPointToLaceProvider>();
 }
 public FakeCallingRgtDataProvider(ISendCommandToBus command)
 {
     _command = command;
 }
 public when_consuming_mmcode_data_provider()
 {
     _command = MonitoringBusBuilder.ForRgtCommands(Guid.NewGuid());
     _request = new[] { new LicensePlateNumberMmCodeOnlyRequest() };
     _response = new Collection<IPointToLaceProvider>(); //new LaceResponseBuilder().WithIvidResponseHandled();
 }