@@ -828,7 +828,6 @@ public void testFetchIncludesParseObject() throws ParseException {
828828 when (store .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class )))
829829 .thenReturn (Task .<ParseObject >forResult (null ));
830830
831- OfflineQueryLogic logic = new OfflineQueryLogic (store );
832831 ParseSQLiteDatabase db = mock (ParseSQLiteDatabase .class );
833832
834833 ParseQuery .State <ParseObject > query = new ParseQuery .State .Builder <>("TestObject" )
@@ -839,7 +838,7 @@ public void testFetchIncludesParseObject() throws ParseException {
839838 ParseObject unfetchedObject = new ParseObject ("TestObject" );
840839 object .put ("foo" , unfetchedObject );
841840
842- ParseTaskUtils .wait (logic .fetchIncludesAsync (object , query , db ));
841+ ParseTaskUtils .wait (OfflineQueryLogic .fetchIncludesAsync (store , object , query , db ));
843842 verify (store ).fetchLocallyAsync (object , db );
844843 verify (store ).fetchLocallyAsync (unfetchedObject , db );
845844 verifyNoMoreInteractions (store );
@@ -851,7 +850,6 @@ public void testFetchIncludesCollection() throws ParseException {
851850 when (store .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class )))
852851 .thenReturn (Task .<ParseObject >forResult (null ));
853852
854- OfflineQueryLogic logic = new OfflineQueryLogic (store );
855853 ParseSQLiteDatabase db = mock (ParseSQLiteDatabase .class );
856854
857855 ParseQuery .State <ParseObject > query = new ParseQuery .State .Builder <>("TestObject" )
@@ -864,7 +862,7 @@ public void testFetchIncludesCollection() throws ParseException {
864862 objects .add (unfetchedObject );
865863 when (object .get ("foo" )).thenReturn (objects );
866864
867- ParseTaskUtils .wait (logic .fetchIncludesAsync (object , query , db ));
865+ ParseTaskUtils .wait (OfflineQueryLogic .fetchIncludesAsync (store , object , query , db ));
868866 verify (store ).fetchLocallyAsync (object , db );
869867 verify (store ).fetchLocallyAsync (unfetchedObject , db );
870868 verifyNoMoreInteractions (store );
@@ -876,7 +874,6 @@ public void testFetchIncludesJSONArray() throws ParseException {
876874 when (store .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class )))
877875 .thenReturn (Task .<ParseObject >forResult (null ));
878876
879- OfflineQueryLogic logic = new OfflineQueryLogic (store );
880877 ParseSQLiteDatabase db = mock (ParseSQLiteDatabase .class );
881878
882879 ParseQuery .State <ParseObject > query = new ParseQuery .State .Builder <>("TestObject" )
@@ -889,7 +886,7 @@ public void testFetchIncludesJSONArray() throws ParseException {
889886 objects .put (unfetchedObject );
890887 when (object .get ("foo" )).thenReturn (objects );
891888
892- ParseTaskUtils .wait (logic .fetchIncludesAsync (object , query , db ));
889+ ParseTaskUtils .wait (OfflineQueryLogic .fetchIncludesAsync (store , object , query , db ));
893890 verify (store ).fetchLocallyAsync (object , db );
894891 verify (store ).fetchLocallyAsync (unfetchedObject , db );
895892 verifyNoMoreInteractions (store );
@@ -901,7 +898,6 @@ public void testFetchIncludesMap() throws ParseException {
901898 when (store .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class )))
902899 .thenReturn (Task .<ParseObject >forResult (null ));
903900
904- OfflineQueryLogic logic = new OfflineQueryLogic (store );
905901 ParseSQLiteDatabase db = mock (ParseSQLiteDatabase .class );
906902
907903 ParseQuery .State <ParseObject > query = new ParseQuery .State .Builder <>("TestObject" )
@@ -914,7 +910,7 @@ public void testFetchIncludesMap() throws ParseException {
914910 objects .put ("bar" , unfetchedObject );
915911 when (object .get ("foo" )).thenReturn (objects );
916912
917- ParseTaskUtils .wait (logic .fetchIncludesAsync (object , query , db ));
913+ ParseTaskUtils .wait (OfflineQueryLogic .fetchIncludesAsync (store , object , query , db ));
918914 verify (store ).fetchLocallyAsync (object , db );
919915 verify (store ).fetchLocallyAsync (unfetchedObject , db );
920916 verifyNoMoreInteractions (store );
@@ -926,7 +922,6 @@ public void testFetchIncludesJSONObject() throws Exception {
926922 when (store .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class )))
927923 .thenReturn (Task .<ParseObject >forResult (null ));
928924
929- OfflineQueryLogic logic = new OfflineQueryLogic (store );
930925 ParseSQLiteDatabase db = mock (ParseSQLiteDatabase .class );
931926
932927 ParseQuery .State <ParseObject > query = new ParseQuery .State .Builder <>("TestObject" )
@@ -939,7 +934,7 @@ public void testFetchIncludesJSONObject() throws Exception {
939934 objects .put ("bar" , unfetchedObject );
940935 when (object .get ("foo" )).thenReturn (objects );
941936
942- ParseTaskUtils .wait (logic .fetchIncludesAsync (object , query , db ));
937+ ParseTaskUtils .wait (OfflineQueryLogic .fetchIncludesAsync (store , object , query , db ));
943938 verify (store ).fetchLocallyAsync (object , db );
944939 verify (store ).fetchLocallyAsync (unfetchedObject , db );
945940 verifyNoMoreInteractions (store );
@@ -951,16 +946,14 @@ public void testFetchIncludesNull() throws ParseException {
951946 when (store .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class )))
952947 .thenReturn (Task .<ParseObject >forResult (null ));
953948
954- OfflineQueryLogic logic = new OfflineQueryLogic (store );
955-
956949 ParseQuery .State <ParseObject > query = new ParseQuery .State .Builder <>("TestObject" )
957950 .include ("foo" )
958951 .build ();
959952
960953 ParseObject object = new ParseObject ("TestObject" );
961954 object .put ("foo" , JSONObject .NULL );
962955
963- ParseTaskUtils .wait (logic .fetchIncludesAsync (object , query , null ));
956+ ParseTaskUtils .wait (OfflineQueryLogic .fetchIncludesAsync (store , object , query , null ));
964957 // only itself
965958 verify (store , times (1 ))
966959 .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class ));
@@ -972,8 +965,6 @@ public void testFetchIncludesNonParseObject() throws ParseException {
972965 when (store .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class )))
973966 .thenReturn (Task .<ParseObject >forResult (null ));
974967
975- OfflineQueryLogic logic = new OfflineQueryLogic (store );
976-
977968 ParseQuery .State <ParseObject > query = new ParseQuery .State .Builder <>("TestObject" )
978969 .include ("foo" )
979970 .build ();
@@ -982,7 +973,7 @@ public void testFetchIncludesNonParseObject() throws ParseException {
982973 object .put ("foo" , 1 );
983974
984975 thrown .expect (ParseException .class );
985- ParseTaskUtils .wait (logic .fetchIncludesAsync (object , query , null ));
976+ ParseTaskUtils .wait (OfflineQueryLogic .fetchIncludesAsync (store , object , query , null ));
986977 // only itself
987978 verify (store , times (1 ))
988979 .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class ));
@@ -994,15 +985,13 @@ public void testFetchIncludesDoesNotExist() throws ParseException {
994985 when (store .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class )))
995986 .thenReturn (Task .<ParseObject >forResult (null ));
996987
997- OfflineQueryLogic logic = new OfflineQueryLogic (store );
998-
999988 ParseQuery .State <ParseObject > query = new ParseQuery .State .Builder <>("TestObject" )
1000989 .include ("foo" )
1001990 .build ();
1002991
1003992 ParseObject object = new ParseObject ("TestObject" );
1004993
1005- ParseTaskUtils .wait (logic .fetchIncludesAsync (object , query , null ));
994+ ParseTaskUtils .wait (OfflineQueryLogic .fetchIncludesAsync (store , object , query , null ));
1006995 // only itself
1007996 verify (store , times (1 ))
1008997 .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class ));
@@ -1014,16 +1003,14 @@ public void testFetchIncludesNestedNull() throws Exception {
10141003 when (store .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class )))
10151004 .thenReturn (Task .<ParseObject >forResult (null ));
10161005
1017- OfflineQueryLogic logic = new OfflineQueryLogic (store );
1018-
10191006 ParseQuery .State <ParseObject > query = new ParseQuery .State .Builder <>("TestObject" )
10201007 .include ("foo.bar" )
10211008 .build ();
10221009
10231010 ParseObject object = new ParseObject ("TestObject" );
10241011 object .put ("foo" , JSONObject .NULL );
10251012
1026- ParseTaskUtils .wait (logic .fetchIncludesAsync (object , query , null ));
1013+ ParseTaskUtils .wait (OfflineQueryLogic .fetchIncludesAsync (store , object , query , null ));
10271014 // only itself
10281015 verify (store , times (1 ))
10291016 .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class ));
@@ -1035,8 +1022,6 @@ public void testFetchIncludesNestedNonParseObject() throws Exception {
10351022 when (store .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class )))
10361023 .thenReturn (Task .<ParseObject >forResult (null ));
10371024
1038- OfflineQueryLogic logic = new OfflineQueryLogic (store );
1039-
10401025 ParseQuery .State <ParseObject > query = new ParseQuery .State .Builder <>("TestObject" )
10411026 .include ("foo.bar" )
10421027 .build ();
@@ -1045,7 +1030,7 @@ public void testFetchIncludesNestedNonParseObject() throws Exception {
10451030 object .put ("foo" , 1 );
10461031
10471032 thrown .expect (IllegalStateException .class );
1048- ParseTaskUtils .wait (logic .fetchIncludesAsync (object , query , null ));
1033+ ParseTaskUtils .wait (OfflineQueryLogic .fetchIncludesAsync (store , object , query , null ));
10491034 // only itself
10501035 verify (store , times (1 ))
10511036 .fetchLocallyAsync (any (ParseObject .class ), any (ParseSQLiteDatabase .class ));
0 commit comments