1516171819202122232425
public void testThatBookReturnsNullIfNotLend() throws Exception { //GIVEN BookInfo bookInfo = new BookInfo(100, "Some Book Title"); //WHEN LocalDate returnDate = bookInfo.returnDueDate(); //THEN assertThat(returnDate, is(nullValue())); }
3132333435363738394041
//WHEN bookInfo.lend(); //THEN assertThat(bookInfo.returnDueDate(), is(inAMonthsTime)); } @Test public void testBookLoosesReturnDateWhenReturned() throws Exception { //GIVEN
4445464748495051525354
//WHEN bookInfo.bringLentItemBack(); //THEN assertThat(bookInfo.returnDueDate(), is(nullValue())); } @Test public void testBookWithMoreThan1000PagesIsHuge() throws Exception { //GIVEN