Search in sources :

Example 1 with ProjectMetadata

use of org.kie.workbench.common.stunner.project.diagram.ProjectMetadata in project kie-wb-common by kiegroup.

the class ProjectDiagramServiceImplTest method testSaveOrUpdate.

@Test
public void testSaveOrUpdate() {
    ProjectMetadata projectMetadata = mock(ProjectMetadata.class);
    when(diagramServiceController.saveOrUpdate(diagram)).thenReturn(projectMetadata);
    ProjectMetadata result = diagramService.saveOrUpdate(diagram);
    verify(diagramServiceController, times(1)).saveOrUpdate(diagram);
    assertEquals(projectMetadata, result);
}
Also used : ProjectMetadata(org.kie.workbench.common.stunner.project.diagram.ProjectMetadata) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ProjectMetadata (org.kie.workbench.common.stunner.project.diagram.ProjectMetadata)1