/** * @covers WindowsAzure\ServiceBus\Models\ListOptions::getTop * @covers WindowsAzure\ServiceBus\Models\ListOptions::setTop */ public function testGetSetTop() { // Setup $expected = 'testTop'; $listOptions = new ListOptions(); // Test $listOptions->setTop($expected); $actual = $listOptions->getTop(); // Assert $this->assertEquals($expected, $actual); }
/** * The base method of all the list operations. * * @param ListOptions $listOptions The options for list operation. * @param string $path The path of the list operation. * * @return none */ private function _listOptions($listOptions, $path) { if (is_null($listOptions)) { $listOptions = new ListOptions(); } $httpCallContext = new HttpCallContext(); $httpCallContext->setMethod(Resources::HTTP_GET); $httpCallContext->setPath($path); $httpCallContext->addStatusCode(Resources::STATUS_OK); $top = $listOptions->getTop(); $skip = $listOptions->getSkip(); if (!empty($top)) { $httpCallContext->addQueryParameter(Resources::QP_TOP, $top); } if (!empty($skip)) { $httpCallContext->addQueryParameter(Resources::QP_SKIP, $skip); } return $this->sendContext($httpCallContext); }