public void ShouldReturnTrueIfBooksReadContainsBook() { UserBooksUpdateModel updateModel = GetUserBooksUpdateModelWithBookInBooksRead(); bool hasReadBook = updateModel.HasReadBook(Book); Assert.True(hasReadBook); }
public void ShouldReturnFalseIfNoBooksInBooksRead() { UserBooksUpdateModel updateModel = GetUserBooksUpdateModel(); bool hasReadBook = updateModel.HasReadBook(Book); Assert.False(hasReadBook); }
public void ShouldReturnTrueIfBooksReadContainsBookAndAnotherBook() { UserBooksUpdateModel updateModel = GetUserBooksUpdateModelWithBookInBooksRead(); updateModel.BooksRead.Add(BookHelpers.GetDefaultTestBookWithSpecifiedTitle("C# for dummies")); bool hasReadBook = updateModel.HasReadBook(Book); Assert.True(hasReadBook); }
public void ShouldReturnFalseIfBooksReadContainsOtherBookButNotBookPassed() { UserBooksUpdateModel updateModel = GetUserBooksUpdateModel(); updateModel.BooksRead.Add(new DevBetterWeb.Core.Entities.Book { Author = "Steve Smith", Title = "C# stuff", Details = "A book about c#", PurchaseUrl = "https://buyabook.com" }); bool hasReadBook = updateModel.HasReadBook(Book); Assert.False(hasReadBook); }