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"); }
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"); }
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"); }