tests/UnitTests/POData/UriProcessor/UriProcessorTest.php
/**
     * test Request Description with all geter method.
     */
test Request Description with all geter method.
test Request Description with all geter method .
public function testRequestDescription()
    {
        $hostInfo = array(
            'AbsoluteRequestUri' => new Url('http://localhost:8083/NorthWindDataService.svc/Orders'),
            'AbsoluteServiceUri' => new Url('http://localhost:8083/NorthWindDataService.svc'),
            'QueryString' => null,
            'DataServiceVersion' => new Version(1, 0),
            'MaxDataServiceVersion' => new Version(2, 0),
        );
        $host = new ServiceHostTestFake($hostInfo);
        $dataService = new NorthWindService2();
        $dataService->setHost($host);
        $uriProcessor = $dataService->handleRequest();
        $requestDescription = $uriProcessor->getRequest();
        $this->assertNotNull($requestDescription);
        $countValue = $requestDescription->getCountValue();
        $this->assertNull($countValue);
        $identifier = $requestDescription->getIdentifier();
        $this->assertNotNull($identifier);
        $filterInfo = $requestDescription->getFilterInfo();
        $this->assertNull($filterInfo);
        $internalOrderByInfo = $requestDescription->getInternalOrderByInfo();
        $this->assertNotNull($internalOrderByInfo);
        $internalSkipTokenInfo = $requestDescription->getInternalSkipTokenInfo();
        $this->assertNull($internalSkipTokenInfo);
        $knownDataServiceVersions = $requestDescription->getKnownDataServiceVersions();
        $this->assertNotNull($knownDataServiceVersions);
        $lastSegmentDescriptor = $requestDescription->getLastSegment();
        $this->assertNotNull($lastSegmentDescriptor);
        $projectedProperty = $requestDescription->getProjectedProperty();
        $this->assertNull($projectedProperty);
        $this->assertEquals(QueryType::ENTITIES(), $requestDescription->queryType);
        $requestUri = $requestDescription->getRequestUrl();
        $this->assertNotNull($requestUri);
        $resourceStreamInfo = $requestDescription->getResourceStreamInfo();
        $this->assertNull($resourceStreamInfo);
        $rootProjectionNode = $requestDescription->getRootProjectionNode();
        $this->assertNotNull($rootProjectionNode);
        $segmentDescriptors = $requestDescription->getSegments();
        $this->assertNotNull($segmentDescriptors);
        $skipCount = $requestDescription->getSkipCount();
        $this->assertNull($skipCount);
        $targetKind = $requestDescription->getTargetKind();
        $this->assertNotNull($targetKind);
        $targetResourceSetWrapper = $requestDescription->getTargetResourceSetWrapper();
        $this->assertNotNull($targetResourceSetWrapper);
        $targetResourceType = $requestDescription->getTargetResourceType();
        $this->assertNotNull($targetResourceType);
        $targetSource = $requestDescription->getTargetSource();
        $this->assertNotNull($targetSource);
        $topCount = $requestDescription->getTopCount();
        $this->assertNotNull($topCount);
    }
public function testRequestDescription ( ) { $ hostInfo = array ( 'AbsoluteRequestUri' => new Url ( 'http://localhost:8083/NorthWindDataService.svc/Orders' ) , 'AbsoluteServiceUri' => new Url ( 'http://localhost:8083/NorthWindDataService.svc' ) , 'QueryString' => null , 'DataServiceVersion' => new Version ( 1 , 0 ) , 'MaxDataServiceVersion' => new Version ( 2 , 0 ) , ) ; $ host = new ServiceHostTestFake ( $ hostInfo ) ; $ dataService = new NorthWindService2 ( ) ; $ dataService -> setHost ( $ host ) ; $ uriProcessor = $ dataService -> handleRequest ( ) ; $ requestDescription = $ uriProcessor -> getRequest ( ) ; $ this -> assertNotNull ( $ requestDescription ) ; $ countValue = $ requestDescription -> getCountValue ( ) ; $ this -> assertNull ( $ countValue ) ; $ identifier = $ requestDescription -> getIdentifier ( ) ; $ this -> assertNotNull ( $ identifier ) ; $ filterInfo = $ requestDescription -> getFilterInfo ( ) ; $ this -> assertNull ( $ filterInfo ) ; $ internalOrderByInfo = $ requestDescription -> getInternalOrderByInfo ( ) ; $ this -> assertNotNull ( $ internalOrderByInfo ) ; $ internalSkipTokenInfo = $ requestDescription -> getInternalSkipTokenInfo ( ) ; $ this -> assertNull ( $ internalSkipTokenInfo ) ; $ knownDataServiceVersions = $ requestDescription -> getKnownDataServiceVersions ( ) ; $ this -> assertNotNull ( $ knownDataServiceVersions ) ; $ lastSegmentDescriptor = $ requestDescription -> getLastSegment ( ) ; $ this -> assertNotNull ( $ lastSegmentDescriptor ) ; $ projectedProperty = $ requestDescription -> getProjectedProperty ( ) ; $ this -> assertNull ( $ projectedProperty ) ; $ this -> assertEquals ( QueryType :: ENTITIES ( ) , $ requestDescription -> queryType ) ; $ requestUri = $ requestDescription -> getRequestUrl ( ) ; $ this -> assertNotNull ( $ requestUri ) ; $ resourceStreamInfo = $ requestDescription -> getResourceStreamInfo ( ) ; $ this -> assertNull ( $ resourceStreamInfo ) ; $ rootProjectionNode = $ requestDescription -> getRootProjectionNode ( ) ; $ this -> assertNotNull ( $ rootProjectionNode ) ; $ segmentDescriptors = $ requestDescription -> getSegments ( ) ; $ this -> assertNotNull ( $ segmentDescriptors ) ; $ skipCount = $ requestDescription -> getSkipCount ( ) ; $ this -> assertNull ( $ skipCount ) ; $ targetKind = $ requestDescription -> getTargetKind ( ) ; $ this -> assertNotNull ( $ targetKind ) ; $ targetResourceSetWrapper = $ requestDescription -> getTargetResourceSetWrapper ( ) ; $ this -> assertNotNull ( $ targetResourceSetWrapper ) ; $ targetResourceType = $ requestDescription -> getTargetResourceType ( ) ; $ this -> assertNotNull ( $ targetResourceType ) ; $ targetSource = $ requestDescription -> getTargetSource ( ) ; $ this -> assertNotNull ( $ targetSource ) ; $ topCount = $ requestDescription -> getTopCount ( ) ; $ this -> assertNotNull ( $ topCount ) ; }
test Request Description with all geter method.
test Request Description with all geter method .