Exemplo n.º 1
0
        public void TestUppercase()
        {
            var yahooFinanceClient = new YahooExchangeHelper();
            var yahooStockCode     = yahooFinanceClient.GetYahooStockCode("ASX", "AFI");

            Assert.Equal("AFI.AX", yahooStockCode);
        }
Exemplo n.º 2
0
        public void TestLowerCaseSymbol()
        {
            var yahooFinanceClient = new YahooExchangeHelper();
            var yahooStockCode     = yahooFinanceClient.GetYahooStockCode("ASX", "afi");

            Assert.Equal("AFI.AX", yahooStockCode);
        }
Exemplo n.º 3
0
        public void TestInvalidExchange()
        {
            var exchange           = "ABC";
            var yahooFinanceClient = new YahooExchangeHelper();
            var exception          = Assert.Throws <Exception>(() => yahooFinanceClient.GetYahooStockCode("ABC", "AFI"));

            Assert.Equal($"The \"{exchange}\" exchange is not supported.", exception.Message);
        }