1717 * limitations under the License.
1818 */
1919
20- import neo4j from '../../src/v1' ;
21- import { int } from '../../src/v1/integer' ;
20+ import neo4j from '../../src' ;
2221import sharedNeo4j from '../internal/shared-neo4j' ;
2322import { ServerVersion , VERSION_3_4_0 } from '../../src/v1/internal/server-version' ;
2423import timesSeries from 'async/timesSeries' ;
2524import _ from 'lodash' ;
26- import {
27- CypherDate ,
28- CypherDateTimeWithZoneId ,
29- CypherDateTimeWithZoneOffset ,
30- CypherDuration ,
31- CypherLocalDateTime ,
32- CypherLocalTime ,
33- CypherTime
34- } from '../../src/v1/temporal-types' ;
3525
3626const RANDOM_VALUES_TO_TEST = 2000 ;
3727const MAX_NANO_OF_SECOND = 999999999 ;
@@ -443,40 +433,40 @@ describe('temporal-types', () => {
443433 }
444434
445435 function randomDateTimeWithZoneOffset ( ) {
446- return new CypherDateTimeWithZoneOffset (
436+ return new neo4j . CypherDateTimeWithZoneOffset (
447437 randomLocalDateTime ( ) ,
448438 randomZoneOffsetSeconds ( )
449439 ) ;
450440 }
451441
452442 function randomDateTimeWithZoneId ( ) {
453- return new CypherDateTimeWithZoneId (
443+ return new neo4j . CypherDateTimeWithZoneId (
454444 randomLocalDateTime ( ) ,
455445 randomZoneId ( )
456446 ) ;
457447 }
458448
459449 function randomLocalDateTime ( ) {
460- return new CypherLocalDateTime ( randomDate ( ) , randomLocalTime ( ) ) ;
450+ return new neo4j . CypherLocalDateTime ( randomDate ( ) , randomLocalTime ( ) ) ;
461451 }
462452
463453 function randomDate ( ) {
464- return new CypherDate (
454+ return new neo4j . CypherDate (
465455 randomInt ( MIN_YEAR , MAX_YEAR ) ,
466456 randomInt ( 1 , 12 ) ,
467457 randomInt ( 1 , 28 )
468458 ) ;
469459 }
470460
471461 function randomTime ( ) {
472- return new CypherTime (
462+ return new neo4j . CypherTime (
473463 randomLocalTime ( ) ,
474464 randomZoneOffsetSeconds ( ) ,
475465 ) ;
476466 }
477467
478468 function randomLocalTime ( ) {
479- return new CypherLocalTime (
469+ return new neo4j . CypherLocalTime (
480470 randomInt ( 0 , 23 ) ,
481471 randomInt ( 0 , 59 ) ,
482472 randomInt ( 0 , 59 ) ,
@@ -485,7 +475,7 @@ describe('temporal-types', () => {
485475 }
486476
487477 function randomZoneOffsetSeconds ( ) {
488- const randomOffsetWithSeconds = int ( randomInt ( MIN_TIME_ZONE_OFFSET , MAX_TIME_ZONE_OFFSET ) ) ;
478+ const randomOffsetWithSeconds = neo4j . int ( randomInt ( MIN_TIME_ZONE_OFFSET , MAX_TIME_ZONE_OFFSET ) ) ;
489479 return randomOffsetWithSeconds . div ( SECONDS_PER_MINUTE ) . multiply ( SECONDS_PER_MINUTE ) ; // truncate seconds
490480 }
491481
@@ -494,34 +484,34 @@ describe('temporal-types', () => {
494484 }
495485
496486 function duration ( months , days , seconds , nanoseconds ) {
497- return new CypherDuration ( int ( months ) , int ( days ) , int ( seconds ) , int ( nanoseconds ) ) ;
487+ return new neo4j . CypherDuration ( neo4j . int ( months ) , neo4j . int ( days ) , neo4j . int ( seconds ) , neo4j . int ( nanoseconds ) ) ;
498488 }
499489
500490 function localTime ( hour , minute , second , nanosecond ) {
501- return new CypherLocalTime ( int ( hour ) , int ( minute ) , int ( second ) , int ( nanosecond ) ) ;
491+ return new neo4j . CypherLocalTime ( neo4j . int ( hour ) , neo4j . int ( minute ) , neo4j . int ( second ) , neo4j . int ( nanosecond ) ) ;
502492 }
503493
504494 function time ( hour , minute , second , nanosecond , offsetSeconds ) {
505- return new CypherTime ( localTime ( hour , minute , second , nanosecond ) , int ( offsetSeconds ) ) ;
495+ return new neo4j . CypherTime ( localTime ( hour , minute , second , nanosecond ) , neo4j . int ( offsetSeconds ) ) ;
506496 }
507497
508498 function date ( year , month , day ) {
509- return new CypherDate ( int ( year ) , int ( month ) , int ( day ) ) ;
499+ return new neo4j . CypherDate ( neo4j . int ( year ) , neo4j . int ( month ) , neo4j . int ( day ) ) ;
510500 }
511501
512502 function localDateTime ( year , month , day , hour , minute , second , nanosecond ) {
513- return new CypherLocalDateTime ( date ( year , month , day ) , localTime ( hour , minute , second , nanosecond ) ) ;
503+ return new neo4j . CypherLocalDateTime ( date ( year , month , day ) , localTime ( hour , minute , second , nanosecond ) ) ;
514504 }
515505
516506 function dateTimeWithZoneOffset ( year , month , day , hour , minute , second , nanosecond , offsetSeconds ) {
517- return new CypherDateTimeWithZoneOffset ( localDateTime ( year , month , day , hour , minute , second , nanosecond ) , int ( offsetSeconds ) ) ;
507+ return new neo4j . CypherDateTimeWithZoneOffset ( localDateTime ( year , month , day , hour , minute , second , nanosecond ) , neo4j . int ( offsetSeconds ) ) ;
518508 }
519509
520510 function dateTimeWithZoneId ( year , month , day , hour , minute , second , nanosecond , zoneId ) {
521- return new CypherDateTimeWithZoneId ( localDateTime ( year , month , day , hour , minute , second , nanosecond ) , zoneId ) ;
511+ return new neo4j . CypherDateTimeWithZoneId ( localDateTime ( year , month , day , hour , minute , second , nanosecond ) , zoneId ) ;
522512 }
523513
524514 function randomInt ( lower , upper ) {
525- return int ( _ . random ( lower , upper ) ) ;
515+ return neo4j . int ( _ . random ( lower , upper ) ) ;
526516 }
527517} ) ;
0 commit comments