Esempio n. 1
0
        public void Stooq_should_not_return_a_stock()
        {
            IStooqService stooqClient = new StooqService();

            var result = stooqClient.GetStock("wrongcode").Result;

            Assert.IsFalse(result.Succeeded, "Stock found with wrong code");
        }
Esempio n. 2
0
        public void Stooq_should_return_a_stock()
        {
            IStooqService stooqClient = new StooqService();

            var result = stooqClient.GetStock("aapl.us").Result;

            Assert.IsTrue(result.Succeeded, "Stock not found");
        }
Esempio n. 3
0
        public void Stooq_should_return_a_stock_for_aaplus()
        {
            IStooqService stooqClient = new StooqService();

            var result = stooqClient.GetStock("aapl.us").Result;

            if (!result.Succeeded)
            {
                throw new NotFoundException();
            }

            Assert.NotNull(result.Content, "Stock not found for aapl.us code");
        }