よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
public void FindByAutorOkResultTest() { var autor = "Dale Carnegie"; var response = _controller.FindByAutor(autor).Result as OkObjectResult; Assert.IsNotNull(response); Assert.AreEqual(200, response.StatusCode); Assert.IsInstanceOfType(response.Value, typeof(IQueryable <BookDto>)); Assert.AreEqual("978-8504018028", ((IQueryable <BookDto>)response.Value).FirstOrDefault().Isbn); Assert.AreEqual("Como Fazer Amigos e Influenciar Pessoas", ((IQueryable <BookDto>)response.Value).FirstOrDefault().Nome); }