/**
  * @covers WindowsAzure\ServiceManagement\Models\UpdateStorageServiceOptions::setLabel
  * @covers WindowsAzure\ServiceManagement\Models\UpdateStorageServiceOptions::getLabel
  */
 public function testSetLabel()
 {
     // Setup
     $options = new UpdateStorageServiceOptions();
     $expected = 'Label';
     // Test
     $options->setLabel($expected);
     // Assert
     $this->assertEquals($expected, $options->getLabel());
 }
 /**
  * Updates the label and/or the description for a storage account in Windows 
  * Azure.
  * 
  * @param string                             $name    The storage account name.
  * @param Models\UpdateStorageServiceOptions $options The optional parameters.
  * 
  * @return none
  * 
  * @see http://msdn.microsoft.com/en-us/library/windowsazure/hh264516.aspx 
  */
 public function updateStorageService($name, $options)
 {
     Validate::isString($name, 'name');
     Validate::notNullOrEmpty($name, 'name');
     $label = $options->getLabel();
     $description = $options->getDescription();
     Validate::isTrue(!empty($label) || !empty($description), Resources::INVALID_USA_OPT_MSG);
     $storageService = new StorageService();
     $storageService->setLabel($options->getLabel());
     $storageService->setDescription($options->getDescription());
     $storageService->addSerializationProperty(XmlSerializer::ROOT_NAME, 'UpdateStorageServiceInput');
     $context = new HttpCallContext();
     $context->setMethod(Resources::HTTP_PUT);
     $context->setPath($this->_getStorageServicePath($name));
     $context->addStatusCode(Resources::STATUS_OK);
     $context->setBody($storageService->serialize($this->dataSerializer));
     $context->addHeader(Resources::CONTENT_TYPE, Resources::XML_ATOM_CONTENT_TYPE);
     $this->sendContext($context);
 }
 /**
  * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::updateStorageService
  * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::_getStorageServicePath
  * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::_getPath
  * @depends testListStorageServices
  */
 public function testUpdateStorageService()
 {
     // Setup
     $name = $this->_storageServiceName;
     $options = new UpdateStorageServiceOptions();
     $expectedDesc = 'My description';
     $expectedLabel = base64_encode('new label');
     $options->setDescription($expectedDesc);
     $options->setLabel($expectedLabel);
     // Test
     $this->restProxy->updateStorageService($name, $options);
     // Assert
     $result = $this->restProxy->getStorageServiceProperties($name);
     $this->assertEquals($expectedDesc, $result->getStorageService()->getDescription());
     $this->assertEquals($expectedLabel, $result->getStorageService()->getLabel());
 }