Beispiel #1
0
        public void GetFeed_WhereServiceIsAvailable_ReturnsValues()
        {
            var url  = ConfigurationManager.AppSettings["currenciesGatewayUrl"];
            var feed = APIUtilities.Get(url);

            Assert.IsTrue(feed.Length > 0);
        }
Beispiel #2
0
        public void GetAll_WhereQuoationsExists_ReturnsMoreThanZero()
        {
            var url    = ConfigurationManager.AppSettings["quotesGatewayUrl"];
            var quotes = APIUtilities.Get(url);

            Assert.IsTrue(quotes.Length > 0);
        }
Beispiel #3
0
        public CurrencyFeed GetFeed()
        {
            var feedString = APIUtilities.Get("http://www.apilayer.net/api/live?access_key=4633a6c0baf8136ca5b9d56a09cce755");

            return(JsonConvert.DeserializeObject <CurrencyFeed>(feedString));
        }