Пример #1
0
 /**
  * Create InsertEntityResult object from HTTP response parts.
  * 
  * @param string            $body           The HTTP response body.
  * @param array             $headers        The HTTP response headers.
  * @param IAtomReaderWriter $atomSerializer The atom reader and writer.
  * 
  * @return \WindowsAzure\Table\Models\InsertEntityResult
  * 
  * @static
  */
 public static function create($body, $headers, $atomSerializer)
 {
     $result = new InsertEntityResult();
     $entity = $atomSerializer->parseEntity($body);
     $entity->setETag(Utilities::tryGetValue($headers, Resources::ETAG));
     $result->setEntity($entity);
     return $result;
 }
 /**
  * @covers WindowsAzure\Table\Models\InsertEntityResult::setEntity
  * @covers WindowsAzure\Table\Models\InsertEntityResult::getEntity
  */
 public function testSetEntity()
 {
     // Setup
     $result = new InsertEntityResult();
     $entity = new Entity();
     // Test
     $result->setEntity($entity);
     // Assert
     $this->assertEquals($entity, $result->getEntity());
 }