@@ -750,7 +750,7 @@ void testSelectMultipleMixed() {
750750 void testExpandSingleNavigationProperty () {
751751 String query = "$expand=Rooms" ;
752752 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
753- expResult .getExpand ().add (new Expand (modelRegistry , testModel .NP_HOUSE_ROOMS ));
753+ expResult .getExpand ().add (new Expand (testModel .NP_HOUSE_ROOMS ));
754754 Query result = QueryParser .parseQuery (query , coreSettings .getQueryDefaults (), coreSettings , path );
755755 result .validate (testModel .ET_HOUSE );
756756 assertEquals (expResult , result );
@@ -760,7 +760,7 @@ void testExpandSingleNavigationProperty() {
760760 void testExpandSingleNavigationPropertyEmpty () {
761761 String query = "$expand=Rooms()" ;
762762 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
763- expResult .getExpand ().add (new Expand (modelRegistry , testModel .NP_HOUSE_ROOMS ));
763+ expResult .getExpand ().add (new Expand (testModel .NP_HOUSE_ROOMS ));
764764 Query result = QueryParser .parseQuery (query , coreSettings .getQueryDefaults (), coreSettings , path );
765765 result .validate (testModel .ET_HOUSE );
766766 assertEquals (expResult , result );
@@ -770,9 +770,9 @@ void testExpandSingleNavigationPropertyEmpty() {
770770 void testExpandDeep () {
771771 String query = "$expand=Rooms/House" ;
772772 Query subQuery = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
773- subQuery .getExpand ().add (new Expand (modelRegistry , testModel .NP_ROOM_HOUSE ));
773+ subQuery .getExpand ().add (new Expand (testModel .NP_ROOM_HOUSE ));
774774 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
775- expResult .getExpand ().add (new Expand (modelRegistry , subQuery , testModel .NP_HOUSE_ROOMS ));
775+ expResult .getExpand ().add (new Expand (subQuery , testModel .NP_HOUSE_ROOMS ));
776776 Query result = QueryParser .parseQuery (query , coreSettings .getQueryDefaults (), coreSettings , path );
777777 result .validate (testModel .ET_HOUSE );
778778 assertEquals (expResult , result );
@@ -787,7 +787,6 @@ void testExpandCustom() {
787787 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path )
788788 .addExpand (
789789 new Expand (
790- modelRegistry ,
791790 new NavigationPropertyCustom (modelRegistry , ModelRegistry .EP_PROPERTIES )
792791 .addToSubPath ("sub" )
793792 .addToSubPath ("link.House" )));
@@ -806,10 +805,9 @@ void testExpandCustom2() {
806805 {
807806 String query = "$expand=Houses,properties/link.House" ;
808807 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path )
809- .addExpand (new Expand (modelRegistry , testModel .NP_HOUSES ))
808+ .addExpand (new Expand (testModel .NP_HOUSES ))
810809 .addExpand (
811810 new Expand (
812- modelRegistry ,
813811 new NavigationPropertyCustom (modelRegistry , ModelRegistry .EP_PROPERTIES )
814812 .addToSubPath ("link.House" )));
815813 Query result = QueryParser .parseQuery (query , coreSettings .getQueryDefaults (), coreSettings , path );
@@ -820,10 +818,9 @@ void testExpandCustom2() {
820818 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path )
821819 .addExpand (
822820 new Expand (
823- modelRegistry ,
824821 new NavigationPropertyCustom (modelRegistry , ModelRegistry .EP_PROPERTIES )
825822 .addToSubPath ("link.House" )))
826- .addExpand (new Expand (modelRegistry , testModel .NP_HOUSES ));
823+ .addExpand (new Expand (testModel .NP_HOUSES ));
827824 Query result = QueryParser .parseQuery (query , coreSettings .getQueryDefaults (), coreSettings , path );
828825 assertEquals (expResult , result );
829826 }
@@ -838,9 +835,9 @@ void testExpandDeepQuery() {
838835 Query subQuery = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
839836 Query subSubQuery = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
840837 subSubQuery .getSelect ().add (testModel .ET_HOUSE .getPrimaryKey ().getKeyProperties ().get (0 ));
841- subQuery .getExpand ().add (new Expand (modelRegistry , subSubQuery , testModel .NP_ROOM_HOUSE ));
838+ subQuery .getExpand ().add (new Expand (subSubQuery , testModel .NP_ROOM_HOUSE ));
842839 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
843- expResult .getExpand ().add (new Expand (modelRegistry , subQuery , testModel .NP_HOUSE_ROOMS ));
840+ expResult .getExpand ().add (new Expand (subQuery , testModel .NP_HOUSE_ROOMS ));
844841 Query result = QueryParser .parseQuery (query , coreSettings .getQueryDefaults (), coreSettings , path );
845842 result .validate (testModel .ET_HOUSE );
846843 assertEquals (expResult , result );
@@ -850,8 +847,8 @@ void testExpandDeepQuery() {
850847 void testExpandMultipleNavigationProperties () {
851848 String query = "$expand=Rooms,House" ;
852849 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
853- expResult .getExpand ().add (new Expand (modelRegistry , testModel .NP_HOUSE_ROOMS ));
854- expResult .getExpand ().add (new Expand (modelRegistry , testModel .NP_ROOM_HOUSE ));
850+ expResult .getExpand ().add (new Expand (testModel .NP_HOUSE_ROOMS ));
851+ expResult .getExpand ().add (new Expand (testModel .NP_ROOM_HOUSE ));
855852 Query result = QueryParser .parseQuery (query , coreSettings .getQueryDefaults (), coreSettings , path );
856853 assertEquals (expResult , result );
857854 }
@@ -860,10 +857,10 @@ void testExpandMultipleNavigationProperties() {
860857 void testExpandMultipleNavigationPropertiesDeep1 () {
861858 String query = "$expand=Rooms/House,Rooms/Rooms" ;
862859 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path )
863- .addExpand (new Expand (modelRegistry , testModel .NP_HOUSE_ROOMS )
860+ .addExpand (new Expand (testModel .NP_HOUSE_ROOMS )
864861 .setSubQuery (new Query (modelRegistry , coreSettings .getQueryDefaults (), path )
865- .addExpand (new Expand (modelRegistry , testModel .NP_ROOM_HOUSE ))
866- .addExpand (new Expand (modelRegistry , testModel .NP_HOUSE_ROOMS ))));
862+ .addExpand (new Expand (testModel .NP_ROOM_HOUSE ))
863+ .addExpand (new Expand (testModel .NP_HOUSE_ROOMS ))));
867864 Query result = QueryParser .parseQuery (query , coreSettings .getQueryDefaults (), coreSettings , path );
868865 result .validate (testModel .ET_HOUSE );
869866 assertEquals (expResult , result );
@@ -873,10 +870,10 @@ void testExpandMultipleNavigationPropertiesDeep1() {
873870 void testExpandMultipleNavigationPropertiesDeep2 () {
874871 String query = "$expand=Houses($expand=Rooms,House)" ;
875872 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path )
876- .addExpand (new Expand (modelRegistry , testModel .NP_HOUSES )
873+ .addExpand (new Expand (testModel .NP_HOUSES )
877874 .setSubQuery (new Query (modelRegistry , coreSettings .getQueryDefaults (), path )
878- .addExpand (new Expand (modelRegistry , testModel .NP_HOUSE_ROOMS ))
879- .addExpand (new Expand (modelRegistry , testModel .NP_ROOM_HOUSE ))));
875+ .addExpand (new Expand (testModel .NP_HOUSE_ROOMS ))
876+ .addExpand (new Expand (testModel .NP_ROOM_HOUSE ))));
880877 Query result = QueryParser .parseQuery (query , coreSettings .getQueryDefaults (), coreSettings , path );
881878 assertEquals (expResult , result );
882879 }
@@ -887,14 +884,14 @@ void testExpandWithSubquery() {
887884 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
888885 Query subQuery = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
889886 subQuery .setFilter (new Equal (new Path (testModel .EP_VALUE ), new IntegerConstant (1 )));
890- subQuery .getExpand ().add (new Expand (modelRegistry , testModel .NP_ROOM_HOUSE ));
887+ subQuery .getExpand ().add (new Expand (testModel .NP_ROOM_HOUSE ));
891888 subQuery .getSelect ().add (testModel .ET_ROOM .getPrimaryKey ().getKeyProperties ().get (0 ));
892889 subQuery .getOrderBy ().add (new OrderBy (new Path (testModel .ET_ROOM .getPrimaryKey ().getKeyProperties ().get (0 ))));
893890 subQuery .setSkip (5 );
894891 subQuery .setTop (10 );
895892 subQuery .setCount (true );
896- expResult .getExpand ().add (new Expand (modelRegistry , subQuery , testModel .NP_HOUSE_ROOMS ));
897- expResult .getExpand ().add (new Expand (modelRegistry , testModel .NP_ROOM_HOUSE ));
893+ expResult .getExpand ().add (new Expand (subQuery , testModel .NP_HOUSE_ROOMS ));
894+ expResult .getExpand ().add (new Expand (testModel .NP_ROOM_HOUSE ));
898895 expResult .setTop (10 );
899896 Query result = QueryParser .parseQuery (query , coreSettings .getQueryDefaults (), coreSettings , path );
900897 result .validate (testModel .ET_ROOM );
@@ -907,10 +904,10 @@ void testComplex1() {
907904 Query expResult = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
908905 Query subQuery1 = new Query (modelRegistry , coreSettings .getQueryDefaults (), path );
909906 subQuery1 .setFilter (new Equal (new Path (testModel .EP_VALUE ), new IntegerConstant (1 )));
910- subQuery1 .getExpand ().add (new Expand (modelRegistry , testModel .NP_ROOM_HOUSE ));
907+ subQuery1 .getExpand ().add (new Expand (testModel .NP_ROOM_HOUSE ));
911908 subQuery1 .getSelect ().add (testModel .ET_ROOM .getPrimaryKey ().getKeyProperties ().get (0 ));
912- expResult .getExpand ().add (new Expand (modelRegistry , subQuery1 , testModel .NP_HOUSE_ROOMS ));
913- expResult .getExpand ().add (new Expand (modelRegistry , testModel .NP_ROOM_HOUSE ));
909+ expResult .getExpand ().add (new Expand (subQuery1 , testModel .NP_HOUSE_ROOMS ));
910+ expResult .getExpand ().add (new Expand (testModel .NP_ROOM_HOUSE ));
914911 expResult .setTop (10 );
915912 Query result = QueryParser .parseQuery (query , coreSettings .getQueryDefaults (), coreSettings , path );
916913 result .validate (testModel .ET_ROOM );
0 commit comments