diff --git a/src/test/java/com/redislabs/redisgraph/RedisGraphAPITest.java b/src/test/java/com/redislabs/redisgraph/RedisGraphAPITest.java index 7586de0..ce2aa59 100644 --- a/src/test/java/com/redislabs/redisgraph/RedisGraphAPITest.java +++ b/src/test/java/com/redislabs/redisgraph/RedisGraphAPITest.java @@ -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)")); @@ -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")); @@ -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")); } @@ -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)"));