@Test public void testCreateEntityWithValidEntity(){ MockMutationExecuterFactory mutationExecutionFactory = new MockMutationExecuterFactory(); GraphMutation graphMutation = new GraphMutation(mutationExecutionFactory); TartanImplTestUtil util = new TartanImplTestUtil(); NewEntity newEntity = util.createNewEntity(TartanImplTestConstants.ATTR_PARENT_ID); BatchMutation createEntity = graphMutation.createEntity(newEntity); assertNotNull(createEntity); }
@Override public BatchMutation createEntity(NewEntity newEntity) { Preconditions.argumentNotNull(newEntity, "newEntity"); CreateEntity createEntity = new CreateEntity(newEntity); pipeline.add(createEntity); return this; }
GraphMutation implements BatchMutation { @Override public BatchMutation createEntity(NewEntity newEntity) { Preconditions.argumentNotNull(newEntity, "newEntity"); CreateEntity createEntity = new CreateEntity(newEntity); pipeline.add(createEntity); return this; } }
GraphMutation implements BatchMutation { @Override public BatchMutation createEntity(NewEntity newEntity) { Preconditions.argumentNotNull(newEntity, "newEntity"); CreateEntity createEntity = new CreateEntity(newEntity); pipeline.add(createEntity); return this; } @Inject  GraphMutation(MutationExecutorFactory factory); }
GraphMutation implements BatchMutation { @Override public BatchMutation createEntity(NewEntity newEntity) { Preconditions.argumentNotNull(newEntity, "newEntity"); CreateEntity createEntity = new CreateEntity(newEntity); pipeline.add(createEntity); return this; } @Inject  GraphMutation(MutationExecutorFactory factory); @Override BatchMutation createEntity(NewEntity newEntity); @Override BatchMutation createRelationship(NewRelationship newRelationship); @Override OperationResult<Result> execute(); @Override Entity.Mutation withEntity(Entity entity); @Override Relationship.Mutation withRelationship(Relationship relationship); }
GraphMutation implements BatchMutation { @Override public BatchMutation createEntity(NewEntity newEntity) { Preconditions.argumentNotNull(newEntity, "newEntity"); CreateEntity createEntity = new CreateEntity(newEntity); pipeline.add(createEntity); return this; } @Inject  GraphMutation(MutationExecutorFactory factory); @Override BatchMutation createEntity(NewEntity newEntity); @Override BatchMutation createRelationship(NewRelationship newRelationship); @Override OperationResult<Result> execute(); @Override Entity.Mutation withEntity(Entity entity); @Override Relationship.Mutation withRelationship(Relationship relationship);  }