import { testService } from '@sap-cloud-sdk/test-services/v2/test-service' ; import { and , asc , desc , or } from '@sap-cloud-sdk/odata-common/internal' ; const { testEntityApi , testEntityMultiLinkApi } = testService ( ) ; const testEntitySchema = testEntityApi . schema ; const testEntityMultiLinkSchema = testEntityMultiLinkApi . schema ; const testEntityInstance = testEntityApi . entityBuilder ( ) . build ( ) ; const testMultiLinkInstance = testEntityMultiLinkApi . entityBuilder ( ) . build ( ) ; /**
 * REQUEST BUILDER
 */ testEntityApi . requestBuilder ( ) ; /**
 * METHOD REQUEST BUILDERS
 */ const testEntityGetAllRequest = testEntityApi . requestBuilder ( ) . getAll ( ) ; testEntityApi . requestBuilder ( ) . getByKey ( 'uuid' , 'test' ) ; testEntityApi . requestBuilder ( ) . create ( testEntityInstance ) ; testEntityApi . requestBuilder ( ) . update ( testEntityInstance ) ; testEntityApi . requestBuilder ( ) . create ( testMultiLinkInstance ) ; testEntityApi . requestBuilder ( ) . update ( testMultiLinkInstance ) ; /**
 * AsChildOf
 */ testEntityMultiLinkApi . requestBuilder ( ) . create ( testMultiLinkInstance ) . asChildOf ( testEntityInstance , testEntitySchema . TO_MULTI_LINK ) ; testEntityMultiLinkApi . requestBuilder ( ) . create ( testMultiLinkInstance ) . asChildOf ( testEntityInstance , testEntitySchema . TO_OTHER_MULTI_LINK ) ; testEntityMultiLinkApi . requestBuilder ( ) . create ( testMultiLinkInstance ) . asChildOf ( testMultiLinkInstance , testEntitySchema . TO_MULTI_LINK ) ; /**
 * SELECTION
 */ testEntityGetAllRequest . select ( testEntitySchema . STRING_PROPERTY ) ; testEntityGetAllRequest . select ( testEntityMultiLinkSchema . STRING_PROPERTY ) ; testEntityGetAllRequest . select ( testEntityApi . customField ( 'CustomField' ) ) ; testEntityGetAllRequest . select ( testEntityMultiLinkApi . customField ( 'CustomField' ) ) ; /**
 * SELECTION & EXPANSION
 */ testEntityGetAllRequest . select ( testEntitySchema . TO_MULTI_LINK . select ( testEntityMultiLinkSchema . STRING_PROPERTY ) ) ; testEntityGetAllRequest . select ( testEntitySchema . TO_SINGLE_LINK . select ( testEntityMultiLinkSchema . BOOLEAN_PROPERTY ) ) ; testEntityGetAllRequest . select ( testEntitySchema . TO_MULTI_LINK . select ( testEntitySchema . KEY_PROPERTY_GUID ) ) ; /**
 * FILTER
 */ testEntityGetAllRequest . filter ( testEntitySchema . STRING_PROPERTY . equals ( 'test' ) ) ; testEntityGetAllRequest . filter ( testEntitySchema . STRING_PROPERTY . equals ( 'test' ) , testEntitySchema . BOOLEAN_PROPERTY . notEquals ( false ) ) ; testEntityGetAllRequest . filter ( and ( testEntitySchema . STRING_PROPERTY . equals ( 'test' ) , testEntitySchema . BOOLEAN_PROPERTY . notEquals ( true ) ) ) ; testEntityGetAllRequest . filter ( or ( testEntitySchema . STRING_PROPERTY . equals ( 'test' ) , testEntitySchema . BOOLEAN_PROPERTY . notEquals ( false ) ) ) ; testEntityGetAllRequest . filter ( testEntityMultiLinkSchema . STRING_PROPERTY . equals ( 'test' ) ) ; testEntityGetAllRequest . filter ( and ( testEntityMultiLinkSchema . STRING_PROPERTY . equals ( 'test' ) ) ) ; testEntityGetAllRequest . filter ( or ( testEntityMultiLinkSchema . STRING_PROPERTY . equals ( 'test' ) ) ) ; testEntityGetAllRequest . filter ( testEntityApi . customField ( 'SomeCustomField' ) . edmString ( ) . equals ( 'test' ) ) ; testEntityGetAllRequest . filter ( testEntityApi . customField ( 'SomeCustomField' ) . edmDouble ( ) . equals ( 1234 ) ) ; testEntityGetAllRequest . filter ( testEntityApi . customField ( 'SomeCustomField' ) . edmTime ( ) . equals ( { seconds : 1 , minutes : 1 , hours : 1 } ) ) ; testEntitySchema . customField ( 'SomeCustomField' ) . edmString ( ) . equals ( 13214 ) ; testEntitySchema . customField ( 'SomeCustomField' ) . edmDouble ( ) . equals ( 'aString' ) ; /**
 * ORDER BY
 */ testEntityGetAllRequest . orderBy ( asc ( testEntitySchema . STRING_PROPERTY ) ) ; testEntityGetAllRequest . orderBy ( desc ( testEntitySchema . STRING_PROPERTY ) ) ; testEntityGetAllRequest . orderBy ( asc ( testEntitySchema . STRING_PROPERTY ) , desc ( testEntitySchema . STRING_PROPERTY ) ) ; testEntityGetAllRequest . orderBy ( asc ( testEntityMultiLinkSchema . STRING_PROPERTY ) ) ;