public void GetBookTest_PassInValidId_ShouldNotReturnBook() { // Arrange JsonBookRepository jsonBookRepository = new JsonBookRepository(); // Act var actual = jsonBookRepository.Get(0); //Assert Assert.IsNull(actual); }
public void GetBookTest_PassValidId_ShouldReturnBook() { // Arrange JsonBookRepository jsonBookRepository = new JsonBookRepository(); Book book = new Book(); jsonBookRepository.Add(book); // Act var actual = jsonBookRepository.Get(book.Id); //Assert Assert.AreEqual(actual, book); }