public PersonService( IConfiguration configuration, IHttpWrapper http) { _config = configuration ?? throw new ArgumentNullException("Config is null"); _http = http ?? throw new ArgumentNullException("Http wrapper is null"); }
public QuestionsController(IQuestionManager questionManager, IAnswerManager answerManager, IPersonaManager personaManager, IHttpWrapper httpWrapper) { if (questionManager == null) { throw new ArgumentNullException(nameof(questionManager)); } if (answerManager == null) { throw new ArgumentNullException(nameof(answerManager)); } if (personaManager == null) { throw new ArgumentNullException(nameof(personaManager)); } if (httpWrapper == null) { throw new ArgumentNullException(nameof(httpWrapper)); } _questionManager = questionManager; _answerManager = answerManager; _personaManager = personaManager; _httpWrapper = httpWrapper; }
public UserService(IPersistenceManager persistenceManager, ILoginForm loginForm, IHttpWrapper httpRequest, IDialogWrapper dialogWrapper) { _persistenceManager = persistenceManager; _loginForm = loginForm; _httpRequest = httpRequest; _dialogWrapper = dialogWrapper; }
public EventListingData(IHttpWrapper httpWrapper, IAppCache cache, ILogger <EventListingData> logger, IFileSystemWrapper fileSystemWrapper) { _httpWrapper = httpWrapper; _cache = cache; _logger = logger; _fileSystemWrapper = fileSystemWrapper; }
public HttpSearchPaymentService(ILogger logger, Credential credentials, IHttpWrapper httpWrapper, string url) : base(credentials, url) { this.Url = url; this.Credentials = credentials; this.httpWrapper = httpWrapper; this.logger = logger; }
public ElasticService(IHttpWrapper httpWrapper, string elasticUri, string elasticAuth) { _elasticUri = new Uri("http://" + elasticUri); _httpClient = httpWrapper; _httpClient.SetBaseAddress(elasticUri); _httpClient.SetBasicAuth(elasticAuth); }
public MoviesRepositoryTests() { this.httpWrapper = Substitute.For <IHttpWrapper>(); this.moviesApiContext = Substitute.For <MoviesApiContext>(); this.httpWrapper.Get <List <MovieQueryResult> >(Arg.Any <Uri>()).Returns(new List <MovieQueryResult>()); this.moviesApiContext.Endpoint = "http://localhost/mock"; }
public YouTubeChannelVideos(IHttpWrapper httpWrapper, IAppCache cache, ILogger <YouTubeChannelVideos> logger, IFileSystemWrapper fileSystemWrapper, ISecretManager secretManager) { _httpWrapper = httpWrapper; _cache = cache; _logger = logger; _fileSystemWrapper = fileSystemWrapper; _secretManager = secretManager; }
public void SetUp() { _subscriptionVasLogic = GetInst <SubscriptionVasLogic> (); _httpWrapper = GetInst <IHttpWrapper> (); _spotifyService = GetInst <SpotifyService> (); base.Setup(); }
public SkyresponseApi(IHttpWrapper httpRequest, IWebSocketWrapper webSocket, ISoundService soundService, IUserService userService) { _httpRequest = httpRequest; _webSocket = webSocket; _soundService = soundService; _userService = userService; _alreadyPlayed = new List <string>(); }
public JobProcessor(ITagRepository tagRepository, IJobRepository jobRepository, IHttpWrapper httpWrapper, IConfigurationProvider configurationProvider) { this.tagRepository = tagRepository; this.jobRepository = jobRepository; this.httpWrapper = httpWrapper; this.configurationProvider = configurationProvider; }
public DevicesService(AuthenticationToken authenticationToken, IHttpWrapper httpWrapper) { if (authenticationToken == null) { throw new ArgumentNullException("authenticationToken"); } if (httpWrapper == null) { throw new ArgumentNullException("httpWrapper"); } _authenticationToken = authenticationToken; _httpWrapper = httpWrapper; }
public void Setup() { var moqConfig = new Mock <IConfiguration>(); moqConfig.Setup(config => config.Get(It.Is <string>(val => val == "peopleService"))) .Returns(_personServiceUrl); _configuration = moqConfig.Object; var moqHttp = new Mock <IHttpWrapper>(); moqHttp.Setup(http => http.GetStringAsync(It.Is <string>(val => val == _personServiceUrl))) .Returns(Task.FromResult(testData)); _http = moqHttp.Object; }
protected T CreateTestControllerWith <T>( SubscriptionVasLogic subscriptionVasLogic = null, IHttpWrapper httpWrapper = null, SpotifyService spotifyService = null) where T : ApiController, new() { subscriptionVasLogic = useOrDefault <SubscriptionVasLogic>(subscriptionVasLogic, _subscriptionVasLogic); httpWrapper = useOrDefault <IHttpWrapper>(httpWrapper, _httpWrapper); spotifyService = useOrDefault <SpotifyService>(spotifyService, _spotifyService); return(new SpotifyController( subscriptionVasLogic, httpWrapper, spotifyService ) as T); }
public TestContextBuilder( IFileSystemWrapper fileSystem, IReferenceProcessor referenceProcessor, IHttpWrapper httpWrapper, IFileProbe fileProbe, ICoverageEngineFactory coverageEngineFactory, IEnumerable <IFrameworkDefinition> frameworkDefinitions, IChutzpahTestSettingsService settingsService) { this.referenceProcessor = referenceProcessor; this.httpClient = httpWrapper; this.fileSystem = fileSystem; this.fileProbe = fileProbe; this.frameworkDefinitions = frameworkDefinitions; this.settingsService = settingsService; this.coverageEngineFactory = coverageEngineFactory; }
public TestContextBuilder( IFileSystemWrapper fileSystem, IReferenceProcessor referenceProcessor, IHttpWrapper httpWrapper, IFileProbe fileProbe, ICoverageEngineFactory coverageEngineFactory, IEnumerable<IFrameworkDefinition> frameworkDefinitions, IChutzpahTestSettingsService settingsService) { this.referenceProcessor = referenceProcessor; this.httpClient = httpWrapper; this.fileSystem = fileSystem; this.fileProbe = fileProbe; this.frameworkDefinitions = frameworkDefinitions; this.settingsService = settingsService; this.coverageEngineFactory = coverageEngineFactory; }
public void SetUp() { _httpClient = Substitute.For <IHttpWrapper>(); _httpClient .GetAsync("http://health0/health") .Returns(CreateFakeResponse(HttpStatusCode.OK, SuccessfulContent)); _httpClient .GetAsync("http://health1/health") .Returns(CreateFakeResponse(HttpStatusCode.InternalServerError, EmptyContent)); _locationServices = new Dictionary <string, string> { { "health0", "health0" }, { "health1", "health1" } }; }
public void SetUp() { var successfulResponse = new HttpResponseMessage() { Content = new StringContent("success"), ReasonPhrase = "reasonPhrase", StatusCode = HttpStatusCode.OK }; _httpWrapper = Substitute.For <IHttpWrapper>(); _httpWrapper.SendAsync(Arg.Any <HttpRequestMessage>()).Returns(successfulResponse); _pingResults = new Dictionary <string, int> { { "health0", 1 }, { "health1", 1 }, { "health2", 1 }, { "health3", 0 } }; }
public TestContextBuilder( IReferenceProcessor referenceProcessor, IFileSystemWrapper fileSystem, IHttpWrapper httpWrapper, IFileProbe fileProbe, IHasher hasher, ICoverageEngine coverageEngine, IJsonSerializer serializer, IEnumerable<IFrameworkDefinition> frameworkDefinitions, IEnumerable<IFileGenerator> fileGenerators) { this.referenceProcessor = referenceProcessor; this.httpClient = httpWrapper; this.fileSystem = fileSystem; this.fileProbe = fileProbe; this.hasher = hasher; this.serializer = serializer; this.frameworkDefinitions = frameworkDefinitions; this.fileGenerators = fileGenerators; mainCoverageEngine = coverageEngine; }
public DeleteMaker(IHttpWrapper wrapper) { _wrapper = wrapper; }
public void Setup() { _wrapper = A.Fake <IHttpWrapper>(); _getRequestMaker = new GetRequestMaker(_wrapper); }
public HttpAuthorizationService(Credential credential, IHttpWrapper httpWrapper, string url) : base(credential, url) { Url = url; Credentials = credential; this.httpWrapper = httpWrapper; }
public GetRequestMaker(IHttpWrapper wrapper) { _wrapper = wrapper; }
public HttpPaymentService(Credential credential, IHttpWrapper httpWrapper, string url) : base(credential, url) { this.Credentials = credential; this.httpWrapper = httpWrapper; }
public PhotosService(IHttpWrapper <List <Photo> > httpWrapper) { _httpWrapper = httpWrapper; }
public AccessTokenHelper(GoogleAuthConfiguration config, IHttpWrapper http) { _config = config; _http = http; }
public AnalyticsDataProvider(string applicationName, IHttpWrapper httpWrapper) { _applicationName = applicationName; _httpWrapper = httpWrapper; }
public RedirectUrlHelper(GoogleAuthConfiguration config, IHttpWrapper http) { _config = config; _http = http; }
public MoviesRepository(IHttpWrapper httpWrapper, MoviesApiContext moviesApiContext) { this.httpWrapper = httpWrapper; this.moviesApiContext = moviesApiContext; }
public HealthPingService(IHttpWrapper httpClient, Dictionary<string, string> services) { _httpClient = httpClient; _serviceLocations = services; }
public APIRequester(IHttpWrapper client) { this.client = client ?? throw new ArgumentNullException(nameof(client)); }
public AlbumsService(IHttpWrapper <List <Album> > httpWrapper, IPhotosService photosService, IMapper <Album, Photo> mapper) { _httpWrapper = httpWrapper; _photosService = photosService; _mapper = mapper; }