@Test public void testSelectEntities(){ Name relationName = Relationship.Name.valueOf("test-relationship"); Direction direction = Direction.IN_OUT; SelectEntities selectEntities = new SelectEntities(relationName , direction ); assertEquals(selectEntities.getDirection(), direction); Predicate predicate = new GraphPredicate(); selectEntities.condition(predicate); assertEquals(selectEntities.getPredicate(), predicate); assertEquals(selectEntities.getRelationName(), relationName); assertEquals(selectEntities.toString(), "Operation [Select Entities] with relation label [test-relationship]"); try{ selectEntities.condition(predicate); fail("resetting predicate should throw exception"); }catch(Exception e){ assertTrue(e instanceof IllegalStateException); } }
public SelectEntities(Relationship.Name relationName, Direction direction) { super(); this.relationName = relationName; if (direction == null) { this.direction = Direction.IN_OUT; } else { this.direction = direction; } }
SelectEntities implements ContextOperation { public SelectEntities(Relationship.Name relationName, Direction direction) { super(); this.relationName = relationName; if (direction == null) { this.direction = Direction.IN_OUT; } else { this.direction = direction; } } }
SelectEntities implements ContextOperation { public SelectEntities(Relationship.Name relationName, Direction direction) { super(); this.relationName = relationName; if (direction == null) { this.direction = Direction.IN_OUT; } else { this.direction = direction; } } SelectEntities(Relationship.Name relationName, Direction direction); }
SelectEntities implements ContextOperation { public SelectEntities(Relationship.Name relationName, Direction direction) { super(); this.relationName = relationName; if (direction == null) { this.direction = Direction.IN_OUT; } else { this.direction = direction; } } SelectEntities(Relationship.Name relationName, Direction direction); Relationship.Name getRelationName(); Direction getDirection(); Predicate getPredicate(); @Override String toString(); @Override void condition(Predicate predicate); }
SelectEntities implements ContextOperation { public SelectEntities(Relationship.Name relationName, Direction direction) { super(); this.relationName = relationName; if (direction == null) { this.direction = Direction.IN_OUT; } else { this.direction = direction; } } SelectEntities(Relationship.Name relationName, Direction direction); Relationship.Name getRelationName(); Direction getDirection(); Predicate getPredicate(); @Override String toString(); @Override void condition(Predicate predicate);  }