/**
  * Validate Offer model when it is used to update a Bol offer
  * @param Offer $offer
  */
 public function validateUpdateOffer(Offer $offer)
 {
     Assert::id($offer->getId());
     Assert::price($offer->getPrice());
     Assert::deliveryCode($offer->getDeliveryCode());
     Assert::publish($offer->getPublish());
     Assert::referenceCode($offer->getReferenceCode());
     Assert::description($offer->getDescription());
 }
 public function testDescriptionTooLong()
 {
     $description = str_repeat("a", 2001);
     $this->setExpectedException("InvalidArgumentException");
     OfferAssertion::description($description);
 }