/** * @covers WindowsAzure\ServiceManagement\Models\InputEndpoint::setPort * @covers WindowsAzure\ServiceManagement\Models\InputEndpoint::getPort */ public function testSetPort() { // Setup $expected = 'port'; $inputendpoint = new InputEndpoint(); // Test $inputendpoint->setPort($expected); // Assert $this->assertEquals($expected, $inputendpoint->getPort()); }
/** * Creates a new InputEndpoint from parsed response body. * * @param array $parsed The parsed response body in array representation. * * @return InputEndpoint */ public static function create($parsed) { $inputEndpoint = new InputEndpoint(); $vip = Utilities::tryGetValue($parsed, Resources::XTAG_VIP); $port = Utilities::tryGetValue($parsed, Resources::XTAG_PORT); $roleName = Utilities::tryGetValue($parsed, Resources::XTAG_ROLE_NAME); $inputEndpoint->setPort($port); $inputEndpoint->setRoleName($roleName); $inputEndpoint->setVip($vip); return $inputEndpoint; }