protected override void BeforeTest() { _muxr = ConnectionMultiplexer.Connect("localhost"); _api = new RedisGraph(_muxr.GetDatabase(0)); Assert.NotNull(_api.Query("social", "CREATE (:person{mixed_prop: 'strval'}), (:person{mixed_prop: 50})")); }
public void TestCreateNode() { // Create a node ResultSet resultSet = _api.Query("social", "CREATE ({name:'roi',age:32})"); Assert.Equal(1, resultSet.Statistics.NodesCreated); Assert.Null(resultSet.Statistics.GetStringValue(Label.NodesDeleted)); Assert.Null(resultSet.Statistics.GetStringValue(Label.RelationshipsCreated)); Assert.Null(resultSet.Statistics.GetStringValue(Label.RelationshipsDeleted)); Assert.Equal(2, resultSet.Statistics.PropertiesSet); Assert.NotNull(resultSet.Statistics.GetStringValue(Label.QueryInternalExecutionTime)); Assert.Equal(0, resultSet.Count()); }