public async Task DiffbotClient_GetArticle_Should_Throw_an_Exception() { // Arrange var client = new DiffbotClient(InvalidApiKey); // Act await client.GetArticle(WebPageUrl1); }
public async Task DiffbotClient_GetArticle_Should_Return_an_Article() { // Arrange var client = new DiffbotClient(ValidApiKey); // Act var article = await client.GetArticle(WebPageUrl1); // Assert Assert.IsNotNull(article); Assert.AreEqual("Silicon Valley stars pony up $2M to scale Diffbot’s visual learning robot", article.Title); }