示例#1
0
        public void GetFinanceDataFromYahoo()
        {
            IFinanceDataService some          = FinanceDataServiceFactory.getWeatherDataService(FinanceDataServiceFactory.FinanceDataImport.YAHOO);
            FinanceData         yahooInstance = some.getFinanceData("GOOG");

            Assert.IsInstanceOfType(yahooInstance, typeof(FinanceData));
        }
        static void Main(string[] args)
        {
            IFinanceDataService some          = FinanceDataServiceFactory.getWeatherDataService(FinanceDataServiceFactory.FinanceDataImport.YAHOO);
            FinanceData         yahooInstance = some.getFinanceData("GOOG");

            Console.WriteLine(yahooInstance.ToString());
            IFinanceDataService some2          = FinanceDataServiceFactory.getWeatherDataService(FinanceDataServiceFactory.FinanceDataImport.GOOGLE);
            FinanceData         googleInstance = some2.getFinanceData("INTC");

            Console.WriteLine(googleInstance.ToString());
        }
示例#3
0
 public void WrongSymbol()
 {
     IFinanceDataService some          = FinanceDataServiceFactory.getWeatherDataService(FinanceDataServiceFactory.FinanceDataImport.YAHOO);
     FinanceData         yahooInstance = some.getFinanceData("SDFDFDPOI");
 }
示例#4
0
 public void NoConnection()
 {
     IFinanceDataService some          = FinanceDataServiceFactory.getWeatherDataService(FinanceDataServiceFactory.FinanceDataImport.YAHOO);
     FinanceData         yahooInstance = some.getFinanceData("GOOG");
 }