public void TestAllCoinsWebCall() { foreach (var type in GetAllWebServiceTestTypes()) { Program.IWebService webService = Program.WebServiceFactory.BuildWebService(type); IList <Program.Coin> coinList = webService.GetAllCoins(); Assert.AreEqual(true, coinList.Any(coin => coin.Name == "Bitcoin")); } }
public void TestHydrateCoinWithInvalidListing() { foreach (var type in GetAllWebServiceTestTypes()) { Program.IWebService webService = Program.WebServiceFactory.BuildWebService(type); IList <Program.Coin> coinList = new List <Program.Coin>(); coinList.Add(new Program.Coin() { Symbol = Guid.NewGuid().ToString() }); webService.HydrateCoinsWithPrices(coinList, Program.TimeFrame.Daily, 60); } }
public void TestHydrateCoinWithValidListing() { foreach (var type in GetAllWebServiceTestTypes()) { Program.IWebService webService = Program.WebServiceFactory.BuildWebService(type); IList <Program.Coin> coinList = new List <Program.Coin>(); coinList.Add(new Program.Coin() { Symbol = "BTC" }); webService.HydrateCoinsWithPrices(coinList, Program.TimeFrame.Daily, 60); Assert.AreEqual(true, coinList[0].PriceCurrent > 0); Assert.AreEqual(true, coinList[0].PriceClose > 0); Assert.AreEqual(true, coinList[0].PriceHigh > 0); Assert.AreEqual(true, coinList[0].PriceLow > 0); Assert.AreEqual(true, coinList[0].PriceOpen > 0); } }