Esempio n. 1
0
 /**
  * Lists all queues in the storage account.
  * 
  * @param ListQueuesOptions $options The optional list queue options.
  * 
  * @return WindowsAzure\Queue\Models\ListQueuesResult
  */
 public function listQueues($options = null)
 {
     $method = Resources::HTTP_GET;
     $headers = array();
     $postParams = array();
     $queryParams = array();
     $path = Resources::EMPTY_STRING;
     $statusCode = Resources::STATUS_OK;
     if (is_null($options)) {
         $options = new ListQueuesOptions();
     }
     $timeout = $options->getTimeout();
     $maxResults = $options->getMaxResults();
     $include = $options->getIncludeMetadata();
     $include = $include ? 'metadata' : null;
     $prefix = $options->getPrefix();
     $marker = $options->getMarker();
     $this->addOptionalQueryParam($queryParams, Resources::QP_TIMEOUT, $timeout);
     $this->addOptionalQueryParam($queryParams, Resources::QP_COMP, 'list');
     $this->addOptionalQueryParam($queryParams, Resources::QP_PREFIX, $prefix);
     $this->addOptionalQueryParam($queryParams, Resources::QP_MARKER, $marker);
     $this->addOptionalQueryParam($queryParams, Resources::QP_INCLUDE, $include);
     $this->addOptionalQueryParam($queryParams, Resources::QP_MAX_RESULTS, $maxResults);
     $response = $this->send($method, $headers, $queryParams, $postParams, $path, $statusCode);
     $parsed = $this->dataSerializer->unserialize($response->getBody());
     return ListQueuesResult::create($parsed);
 }
 /**
  * @covers WindowsAzure\Queue\Models\ListQueuesResult::getAccountName
  */
 public function testGetAccountName()
 {
     // Setup
     $result = new ListQueuesResult();
     $expected = 'name';
     $result->setAccountName($expected);
     // Test
     $actual = $result->getAccountName();
     // Assert
     $this->assertEquals($expected, $actual);
 }
 /**
  * @covers WindowsAzure\Queue\Models\ListQueuesResult::getMaxResults
  */
 public function testGetMaxResults()
 {
     // Setup
     $options = new ListQueuesResult();
     $expected = '3';
     $options->setMaxResults($expected);
     // Test
     $actual = $options->getMaxResults();
     // Assert
     $this->assertEquals($expected, $actual);
 }