Skip to content

Construct Integers for mocking Neo4j responses in unit tests? #293

Closed
@laurieboyes

Description

@laurieboyes

As the Integer class exposes no constructor, it's not possible to create Integer instances to use in mocked query responses when writing unit tests for code that deals with Neo4j records.

Is there a recommended alternative solution for mocking Neo4j query responses?

The top of the Integer docs page suggests that there is a way of constructing Integers using the listed 'from*' functions, but I can't find any further reference to these on the page. http://neo4j.com/docs/api/javascript-driver/current/class/src/v1/integer.js~Integer.html

This issue is semi-related to #245, as I believe this and many other use cases would be simplified if the driver offered an option assume all numbers coming back from the database are within the safe 32 bit number range.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions