Search in sources :

Example 11 with DeleteProcessDefinitionsBuilder

use of org.camunda.bpm.engine.repository.DeleteProcessDefinitionsBuilder in project camunda-bpm-platform by camunda.

the class ProcessDefinitionRestServiceInteractionTest method testDeleteDefinitionsByKey.

@Test
public void testDeleteDefinitionsByKey() {
    given().pathParam("key", MockProvider.EXAMPLE_PROCESS_DEFINITION_KEY).expect().statusCode(Status.NO_CONTENT.getStatusCode()).when().delete(SINGLE_PROCESS_DEFINITION_BY_KEY_DELETE_URL);
    DeleteProcessDefinitionsBuilder builder = repositoryServiceMock.deleteProcessDefinitions().byKey(MockProvider.EXAMPLE_PROCESS_DEFINITION_KEY);
    verify(builder).delete();
}
Also used : DeleteProcessDefinitionsBuilder(org.camunda.bpm.engine.repository.DeleteProcessDefinitionsBuilder) Test(org.junit.Test)

Example 12 with DeleteProcessDefinitionsBuilder

use of org.camunda.bpm.engine.repository.DeleteProcessDefinitionsBuilder in project camunda-bpm-platform by camunda.

the class ProcessDefinitionRestServiceInteractionTest method testDeleteDefinitionsByKeySkipCustomListeners.

@Test
public void testDeleteDefinitionsByKeySkipCustomListeners() {
    given().pathParam("key", MockProvider.EXAMPLE_PROCESS_DEFINITION_KEY).queryParam("skipCustomListeners", true).expect().statusCode(Status.NO_CONTENT.getStatusCode()).when().delete(SINGLE_PROCESS_DEFINITION_BY_KEY_DELETE_URL);
    DeleteProcessDefinitionsBuilder builder = repositoryServiceMock.deleteProcessDefinitions().byKey(MockProvider.EXAMPLE_PROCESS_DEFINITION_KEY).skipCustomListeners();
    verify(builder).delete();
}
Also used : DeleteProcessDefinitionsBuilder(org.camunda.bpm.engine.repository.DeleteProcessDefinitionsBuilder) Test(org.junit.Test)

Aggregations

DeleteProcessDefinitionsBuilder (org.camunda.bpm.engine.repository.DeleteProcessDefinitionsBuilder)12 Test (org.junit.Test)10 RepositoryService (org.camunda.bpm.engine.RepositoryService)2 NotFoundException (org.camunda.bpm.engine.exception.NotFoundException)1