/// <summary> /// Retrieves investors and their industries from AngelList and stores them in a database. /// </summary> /// <param name="angelListClient">IAngelListClient</param> /// <param name="logWriter">LogWriter</param> public InvestorIndustriesLoader(IAngelListClient angelListClient, LogWriter logWriter) { if (angelListClient == null) { throw new ArgumentNullException("angelListClient"); } this.AngelListClient = angelListClient; if (logWriter == null) { throw new ArgumentNullException("logWriter"); } this.defaultLogWriter = logWriter; int maxRangeLength = Properties.Settings.Default.MaxRangeLength; int maxRanges = Properties.Settings.Default.MaxRanges; this.paramParser = new QueryParameterParser(maxRangeLength, maxRanges); ConfigurationProvider config = new ConfigurationProvider(); config.Add(ConfigName.SqlConnectionString, Screen.Vc.DataAccess.Investors.Properties.Settings.Default.ScreenVcConnectionString); config.Add(ConfigName.SqlConnectTimeoutInSeconds, Screen.Vc.DataAccess.Investors.Properties.Settings.Default.SqlConnectTimeoutInSeconds); this.configurationProvider = config; }
public void InitializeTest() { ConfigurationProvider config = new ConfigurationProvider(); config.Add(ConfigName.SqlConnectionString, Screen.Vc.DataAccess.Investors.Properties.Settings.Default.ScreenVcConnectionString); config.Add(ConfigName.SqlConnectTimeoutInSeconds, Screen.Vc.DataAccess.Investors.Properties.Settings.Default.SqlConnectTimeoutInSeconds); this.configurationProvider = config; sqlCommonTasks = new SqlCommonTasks(this.configurationProvider); }
public static void InitializeClass(TestContext context) { BaseAddress = "http://api.angel.co/1"; IRestClient restClient = new SimpleRestClient(); AngelListClient = new JsonNetAngelListClient(BaseAddress, restClient); defaultLogWriter = EnterpriseLibraryContainer.Current.GetInstance <LogWriter>(); ConfigurationProvider config = new ConfigurationProvider(); config.Add(ConfigName.SqlConnectionString, Screen.Vc.DataAccess.Investors.Properties.Settings.Default.ScreenVcConnectionString); config.Add(ConfigName.SqlConnectTimeoutInSeconds, Screen.Vc.DataAccess.Investors.Properties.Settings.Default.SqlConnectTimeoutInSeconds); sqlCommonTasks = new SqlCommonTasks(config); }