Exemplo n.º 1
0
        public void GetTradeCalendarAsyncTest()
        {
            SecurityBasicInfoAdapter securityBasicInfoAdapter = new SecurityBasicInfoAdapter();
            var data = securityBasicInfoAdapter.GetTradeCalendars().Result;

            Assert.IsTrue(data.Count() > 0);
        }
Exemplo n.º 2
0
        public void GetChinaStocksAsyncTest()
        {
            SecurityBasicInfoAdapter securityBasicInfoAdapter = new SecurityBasicInfoAdapter();
            var data = securityBasicInfoAdapter.GetChinaStocksAsync().Result;

            Assert.AreEqual(data.Key.Count(), data.Value.Count());
            foreach (var stock in data.Key)
            {
                Assert.AreEqual(1, data.Value.Count(o => o.ProviderKey == stock.ProviderKey));
                var securityProviderInfo = data.Value.First(o => o.ProviderKey == stock.ProviderKey);
                Assert.AreEqual(DataProvider.TuShare, securityProviderInfo.Provider);
            }
        }