public function testSameValueAs()
 {
     $anUuid = Uuid::uuid4();
     $aQueryResultId = new QueryResultId($anUuid);
     $sameQueryResultId = new QueryResultId($anUuid);
     $otherQueryResultId = new QueryResultId(Uuid::uuid4());
     $this->assertTrue($aQueryResultId->sameValueAs($sameQueryResultId));
     $this->assertFalse($aQueryResultId->sameValueAs($otherQueryResultId));
 }
 public function testQueryResultId()
 {
     $this->assertTrue($this->queryResultId->sameValueAs($this->queryResultCreated->queryResultId()));
 }
 /**
  * @param QueryResultId   $aQueryResultId
  * @param MetaInformation $aMetaInformation
  * @param Result          $aResult
  */
 public function __construct(QueryResultId $aQueryResultId, MetaInformation $aMetaInformation, Result $aResult)
 {
     $this->update(new QueryResultCreated(array('queryResultId' => $aQueryResultId->toString(), 'metaInformation' => $aMetaInformation->toArray(), 'result' => array('resultClass' => get_class($aResult), 'data' => $aResult->toJSON()))));
 }
 /**
  * @param QueryResultId $aQueryResultId
  * @return QueryResult
  */
 public function getQueryResultOfId(QueryResultId $aQueryResultId)
 {
     return $this->find($aQueryResultId->toString());
 }