Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/test/java/com/redislabs/redisgraph/RedisGraphAPITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public void testRecord(){
+ "nullValue=Property{name='nullValue', type=PROPERTY_NULL, value=null}, "
+ "since=Property{name='since', type=PROPERTY_INTEGER, value=2000}}}", expectedEdge.toString());

Assert.assertNotNull(api.query("social", "CREATE (:person{name:%s',age:%d, doubleValue:%f, boolValue:%b, nullValue:null})", name, age, doubleValue, boolValue));
Assert.assertNotNull(api.query("social", "CREATE (:person{name:%s,age:%d, doubleValue:%f, boolValue:%b, nullValue:null})", name, age, doubleValue, boolValue));
Assert.assertNotNull(api.query("social", "CREATE (:person{name:'amit',age:30})"));
Assert.assertNotNull(api.query("social", "MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') " +
"CREATE (a)-[:knows{place:'TLV', since:2000,doubleValue:3.14, boolValue:false, nullValue:null}]->(b)"));
Expand Down Expand Up @@ -298,9 +298,9 @@ public void testRecord(){
}

Assert.assertEquals( "roi", record.getString(2));
Assert.assertEquals( "32", record.getString(3));
Assert.assertEquals( 32L, ((Integer)(record.getValue(3))).longValue());
Assert.assertEquals( 32L, ((Integer)record.getValue("a.age")).longValue());
Assert.assertEquals( "32", record.getString(3));
Assert.assertEquals( 32L, ((Integer)(record.getValue(3))).longValue());
Assert.assertEquals( 32L, ((Integer)record.getValue("a.age")).longValue());
Assert.assertEquals( "roi", record.getString("a.name"));
Assert.assertEquals( "32", record.getString("a.age"));

Expand Down Expand Up @@ -502,9 +502,9 @@ record = resultSet.next();

@Test
public void testEscapedQuery() {
Assert.assertNotNull(api.query("social", "CREATE (:escaped{s1:%s,s2:%s})", "S\"\'", "S\\'\\\""));
Assert.assertNotNull(api.query("social", "MATCH (n) where n.s1=%s and n.s2=%s RETURN n", "S\"\'", "S\\'\\\""));
Assert.assertNotNull(api.query("social", "MATCH (n) where n.s1='S\"\\'' RETURN n"));
Assert.assertNotNull(api.query("social", "CREATE (:escaped{s1:%s,s2:%s})", "S\"'", "S'\""));
Assert.assertNotNull(api.query("social", "MATCH (n) where n.s1=%s and n.s2=%s RETURN n", "S\"'", "S'\""));
Assert.assertNotNull(api.query("social", "MATCH (n) where n.s1='S\"' RETURN n"));
}


Expand Down Expand Up @@ -658,7 +658,7 @@ public void testContextedAPI() {
expectedEdge.addProperty(nullProperty);

try (RedisGraphContext c = api.getContext()) {
Assert.assertNotNull(c.query("social", "CREATE (:person{name:%s',age:%d, doubleValue:%f, boolValue:%b, nullValue:null})", name, age, doubleValue, boolValue));
Assert.assertNotNull(c.query("social", "CREATE (:person{name:%s,age:%d, doubleValue:%f, boolValue:%b, nullValue:null})", name, age, doubleValue, boolValue));
Assert.assertNotNull(c.query("social", "CREATE (:person{name:'amit',age:30})"));
Assert.assertNotNull(c.query("social", "MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') " +
"CREATE (a)-[:knows{place:'TLV', since:2000,doubleValue:3.14, boolValue:false, nullValue:null}]->(b)"));
Expand Down