public function whenBookSaleCancelled(BookSaleCancelled $event)
 {
     $book = $this->books->find((string) $event->bookId());
     $book = new AvailableBook($book->bookId(), $book->title(), $book->author(), $book->price(), $book->isbn(), $book->pathToCover(), false);
     $this->books->save($book);
 }
 public function whenBookSaleCancelled(BookSaleCancelled $event)
 {
     $book = $this->books->find((string) $event->bookId());
     $book = new BookTransaction($book->bookId(), $book->title(), $book->sellersId(), $book->sellersName(), null, null, $book->price(), false, false);
     $this->books->save($book);
 }
 /** @test */
 public function an_event_holds_data()
 {
     $bookId = BookId::generate();
     $event = new BookSaleCancelled($bookId);
     $this->assertEquals($event->bookId(), $bookId);
 }