 @description Check nodes creation / setProperty / deletion
 db.nodes(props).setProperty(name, val)
 ###
-Tinytest.add 'db.nodes create / setProperty / delete', (test) ->
+Tinytest.add 'Neo4jNode - setProperty()', (test) ->
   node = db.nodes({testNodes: true})
   _id = node.get().id
   

@description Check Neo4jTransaction `.last()` method
db.transaction().execute(['query', 'query']).last().rollback()
###
Tinytest.add 'db.transaction [last]', (test) ->
  t = db.transaction().execute(
    ["CREATE (n:TransactionsTesting {data1})", "CREATE (n:TransactionsTesting2 {data2}) RETURN n"]
  , 

  test.isTrue _.isFunction node.update

__relationCRC__ = (test, r, from, to, type, props = {}) ->
  test.instanceOf r, Neo4jRelationship
  test.isTrue _.isFunction r.get
  test.isTrue _.isFunction r.delete
  test.isTrue _.isFunction r.update
  test.isTrue _.isFunction r.__refresh

  _r = r.get()
  test.isTrue _.has _r, 'id'
  test.isTrue _.has _r, 'metadata'
  test.isTrue _.has _r, 'type'
  test.isTrue _.has _r, 'start'
  test.isTrue _.has _r, 'end'

  test.isTrue _r.type is type if type

  if props
    for key, value of props
      test.isTrue _.has _r, key
      test.equal _r[key], value

  test.equal _r.start, from if from
  test.equal _r.end, to if to

Tinytest.add 'Neo4jDB - service endpoints - [BASICS]', (test) ->
  test.isTrue _.isArray db.propertyKeys()
  test.isTrue _.isArray db.labels()
  test.isTrue _.isArray db.relationshipTypes()
