Search in sources :

Example 1 with Actor

use of org.finos.waltz.model.actor.Actor in project waltz by khartec.

the class FlowDiagramService method makeForActor.

private Long makeForActor(EntityReference ref, String userId, String providedTitle) {
    Actor actor = actorDao.getById(ref.id());
    String title = isEmpty(providedTitle) ? actor.name() + " flows" : providedTitle;
    ArrayList<FlowDiagramEntity> entities = newArrayList(mkDiagramEntity(actor));
    ArrayList<FlowDiagramAnnotation> annotations = newArrayList(mkDiagramAnnotation(actor.entityReference(), title));
    return mkNewFlowDiagram(title, userId, entities, annotations);
}
Also used : Actor(org.finos.waltz.model.actor.Actor)

Example 2 with Actor

use of org.finos.waltz.model.actor.Actor in project waltz by khartec.

the class ActorServiceTest method actorsCanBeCreated.

@Test
public void actorsCanBeCreated() {
    String name = mkName("actorsCanBeCreated");
    Long id = helper.createActor(name);
    Actor retrieved = svc.getById(id);
    assertEquals(name, retrieved.name());
    assertEquals(name + " Desc", retrieved.description());
    assertTrue(retrieved.isExternal());
}
Also used : Actor(org.finos.waltz.model.actor.Actor) BaseInMemoryIntegrationTest(org.finos.waltz.integration_test.inmem.BaseInMemoryIntegrationTest) Test(org.junit.jupiter.api.Test)

Aggregations

Actor (org.finos.waltz.model.actor.Actor)2 BaseInMemoryIntegrationTest (org.finos.waltz.integration_test.inmem.BaseInMemoryIntegrationTest)1 Test (org.junit.jupiter.api.Test)1