tests/UnitTests/POData/UriProcessor/QueryProcessor/SkipTokenParser/SkipTokenParserTest.php
/**
     * test the creation of nextlink from an object.
     * Test building of link with guid sub-value
     */
test the creation of nextlink from an object.
Test building of link with guid sub-value
test the creation of nextlink from an object . Test building of link with guid sub - value
public function testCreationOfNextLink4()
    {
        $northWindMetadata = NorthWindMetadata::Create();
        $configuration = new ServiceConfiguration($northWindMetadata);
        $configuration->setEntitySetAccessRule('*', EntitySetRights::ALL);
        $providersWrapper = new ProvidersWrapper(
                                    $northWindMetadata, 
	                                $this->mockQueryProvider,
                                    $configuration, 
                                    false
                                    );
        $resourceSetWrapper = $providersWrapper->resolveResourceSet('Customers');
        $resourceType = $resourceSetWrapper->getResourceType();
        $orderBy = 'CustomerID, CustomerGuid';
        $internalOrderByInfo = OrderByParser::parseOrderByClause($resourceSetWrapper, $resourceType, $orderBy, $providersWrapper);
        $skipToken = "null, guid'05b242e752eb46bd8f0e6568b72cd9a5'";
        $internalSkipTokenInfo = SkipTokenParser::parseSkipTokenClause($resourceType, $internalOrderByInfo, $skipToken);
        $keyObject = $internalSkipTokenInfo->getKeyObject();
        $lastObject = new Customer2();
        $lastObject->CustomerID = 'ABC';
        $lastObject->CustomerGuid = '{05b242e7-52eb-46bd-8f0e-6568b72cd9a5}';
        $nextLink = $internalSkipTokenInfo->buildNextPageLink($lastObject);
        $this->assertEquals($nextLink, "'ABC', guid'%7B05b242e7-52eb-46bd-8f0e-6568b72cd9a5%7D'");
    }
public function testCreationOfNextLink4 ( ) { $ northWindMetadata = NorthWindMetadata :: Create ( ) ; $ configuration = new ServiceConfiguration ( $ northWindMetadata ) ; $ configuration -> setEntitySetAccessRule ( '*' , EntitySetRights :: ALL ) ; $ providersWrapper = new ProvidersWrapper ( $ northWindMetadata , $ this -> mockQueryProvider , $ configuration , false ) ; $ resourceSetWrapper = $ providersWrapper -> resolveResourceSet ( 'Customers' ) ; $ resourceType = $ resourceSetWrapper -> getResourceType ( ) ; $ orderBy = 'CustomerID, CustomerGuid' ; $ internalOrderByInfo = OrderByParser :: parseOrderByClause ( $ resourceSetWrapper , $ resourceType , $ orderBy , $ providersWrapper ) ; $ skipToken = " null, guid'05b242e752eb46bd8f0e6568b72cd9a5' " ; $ internalSkipTokenInfo = SkipTokenParser :: parseSkipTokenClause ( $ resourceType , $ internalOrderByInfo , $ skipToken ) ; $ keyObject = $ internalSkipTokenInfo -> getKeyObject ( ) ; $ lastObject = new Customer2 ( ) ; $ lastObject -> CustomerID = 'ABC' ; $ lastObject -> CustomerGuid = '{05b242e7-52eb-46bd-8f0e-6568b72cd9a5}' ; $ nextLink = $ internalSkipTokenInfo -> buildNextPageLink ( $ lastObject ) ; $ this -> assertEquals ( $ nextLink , " 'ABC', guid'%7B05b242e7-52eb-46bd-8f0e-6568b72cd9a5%7D' " ) ; }
test the creation of nextlink from an object.
test the creation of nextlink from an object .
//IMetadataProvider implementation //Service configuuration