@@ -203,17 +203,15 @@ public void testRecord(){
203203 String place = "TLV" ;
204204 int since = 2000 ;
205205
206+ Property <String > nameProperty = new Property <>("name" , name );
207+ Property <Integer > ageProperty = new Property <>("age" , age );
208+ Property <Double > doubleProperty = new Property <>("doubleValue" , doubleValue );
209+ Property <Boolean > trueBooleanProperty = new Property <>("boolValue" , true );
210+ Property <Boolean > falseBooleanProperty = new Property <>("boolValue" , false );
211+ Property <?> nullProperty = new Property <>("nullValue" , null );
206212
207-
208- Property nameProperty = new Property ("name" , name );
209- Property ageProperty = new Property ("age" , age );
210- Property doubleProperty = new Property ("doubleValue" , doubleValue );
211- Property trueBooleanProperty = new Property ("boolValue" , true );
212- Property falseBooleanProperty = new Property ("boolValue" , false );
213- Property nullProperty = new Property ("nullValue" , null );
214-
215- Property placeProperty = new Property ("place" , place );
216- Property sinceProperty = new Property ("since" , since );
213+ Property <String > placeProperty = new Property <>("place" , place );
214+ Property <Integer > sinceProperty = new Property <>("since" , since );
217215
218216 Node expectedNode = new Node ();
219217 expectedNode .setId (0 );
@@ -340,9 +338,9 @@ public void testMultiThread(){
340338 mapToObj (i -> api .query ("social" , "MATCH (a:person)-[r:knows]->(b:person) RETURN a,r, a.age" )).
341339 collect (Collectors .toList ());
342340
343- Property nameProperty = new Property ("name" , "roi" );
344- Property ageProperty = new Property ("age" , 32 );
345- Property lastNameProperty =new Property ("lastName" , "a" );
341+ Property < String > nameProperty = new Property <> ("name" , "roi" );
342+ Property < Integer > ageProperty = new Property <> ("age" , 32 );
343+ Property < String > lastNameProperty =new Property <> ("lastName" , "a" );
346344
347345 Node expectedNode = new Node ();
348346 expectedNode .setId (0 );
@@ -423,9 +421,9 @@ public void testAdditionToProcedures(){
423421 Assert .assertNotNull (api .query ("social" , "MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]->(b)" ));
424422
425423 //expected objects init
426- Property nameProperty = new Property ("name" , "roi" );
427- Property ageProperty = new Property ("age" , 32 );
428- Property lastNameProperty =new Property ("lastName" , "a" );
424+ Property < String > nameProperty = new Property <> ("name" , "roi" );
425+ Property < Integer > ageProperty = new Property <> ("age" , 32 );
426+ Property < String > lastNameProperty =new Property <> ("lastName" , "a" );
429427
430428 Node expectedNode = new Node ();
431429 expectedNode .setId (0 );
@@ -549,7 +547,7 @@ public void testMultiExec(){
549547 Assert .assertEquals (1 , schemaNames .size ());
550548 Assert .assertEquals ("n" , schemaNames .get (0 ));
551549
552- Property nameProperty = new Property ("name" , "a" );
550+ Property < String > nameProperty = new Property <> ("name" , "a" );
553551
554552 Node expectedNode = new Node ();
555553 expectedNode .setId (0 );
@@ -596,15 +594,15 @@ public void testContextedAPI() {
596594 int since = 2000 ;
597595
598596
599- Property nameProperty = new Property ("name" , name );
600- Property ageProperty = new Property ("age" , age );
601- Property doubleProperty = new Property ("doubleValue" , doubleValue );
602- Property trueBooleanProperty = new Property ("boolValue" , true );
603- Property falseBooleanProperty = new Property ("boolValue" , false );
604- Property nullProperty = new Property ("nullValue" , null );
597+ Property < String > nameProperty = new Property <> ("name" , name );
598+ Property < Integer > ageProperty = new Property <> ("age" , age );
599+ Property < Double > doubleProperty = new Property <> ("doubleValue" , doubleValue );
600+ Property < Boolean > trueBooleanProperty = new Property <> ("boolValue" , true );
601+ Property < Boolean > falseBooleanProperty = new Property <> ("boolValue" , false );
602+ Property <?> nullProperty = new Property <> ("nullValue" , null );
605603
606- Property placeProperty = new Property ("place" , place );
607- Property sinceProperty = new Property ("since" , since );
604+ Property < String > placeProperty = new Property <> ("place" , place );
605+ Property < Integer > sinceProperty = new Property <> ("since" , since );
608606
609607 Node expectedNode = new Node ();
610608 expectedNode .setId (0 );
@@ -737,9 +735,9 @@ public void testArraySupport() {
737735 Node expectedANode = new Node ();
738736 expectedANode .setId (0 );
739737 expectedANode .addLabel ("person" );
740- Property aNameProperty = new Property ("name" , "a" );
741- Property aAgeProperty = new Property ("age" , 32 );
742- Property aListProperty = new Property ("array" , Arrays .asList (0L , 1L , 2L ));
738+ Property < String > aNameProperty = new Property <> ("name" , "a" );
739+ Property < Integer > aAgeProperty = new Property <> ("age" , 32 );
740+ Property < List < Long >> aListProperty = new Property <> ("array" , Arrays .asList (0L , 1L , 2L ));
743741 expectedANode .addProperty (aNameProperty );
744742 expectedANode .addProperty (aAgeProperty );
745743 expectedANode .addProperty (aListProperty );
@@ -748,9 +746,9 @@ public void testArraySupport() {
748746 Node expectedBNode = new Node ();
749747 expectedBNode .setId (1 );
750748 expectedBNode .addLabel ("person" );
751- Property bNameProperty = new Property ("name" , "b" );
752- Property bAgeProperty = new Property ("age" , 30 );
753- Property bListProperty = new Property ("array" , Arrays .asList (3L , 4L , 5L ));
749+ Property < String > bNameProperty = new Property <> ("name" , "b" );
750+ Property < Integer > bAgeProperty = new Property <> ("age" , 30 );
751+ Property < List < Long >> bListProperty = new Property <> ("array" , Arrays .asList (3L , 4L , 5L ));
754752 expectedBNode .addProperty (bNameProperty );
755753 expectedBNode .addProperty (bAgeProperty );
756754 expectedBNode .addProperty (bListProperty );
@@ -783,7 +781,7 @@ public void testArraySupport() {
783781 Assert .assertEquals (Arrays .asList ("x" ), record .keys ());
784782
785783
786- List x = record .getValue ("x" );
784+ List < Long > x = record .getValue ("x" );
787785 Assert .assertEquals (Arrays .asList (0L , 1L , 2L ), x );
788786
789787 // test collect
@@ -928,18 +926,14 @@ record = resultSet.next();
928926 // Test a query that produces 2 records, the first containing a path and the second containing a null value.
929927 resultSet = api .query ("social" , "MATCH (a) OPTIONAL MATCH p = (a)-[e]->(b) RETURN p" );
930928 Assert .assertEquals (2 , resultSet .size ());
929+
931930 record = resultSet .next ();
932931 Assert .assertEquals (1 , record .size ());
933-
934- Object path = record .getValue (0 );
935932 Assert .assertNotNull (record .getValue (0 ));
936933
937934 record = resultSet .next ();
938935 Assert .assertEquals (1 , record .size ());
939-
940- path = record .getValue (0 );
941936 Assert .assertNull (record .getValue (0 ));
942-
943937 }
944938
945939 @ Test
0 commit comments