Search in sources :

Example 6 with NullValueException

use of org.camunda.bpm.engine.exception.NullValueException in project camunda-bpm-platform by camunda.

the class DeploymentQueryTest method testQueryByDeploymentBefore.

public void testQueryByDeploymentBefore() throws Exception {
    Date later = DateTimeUtil.now().plus(10 * 3600).toDate();
    Date earlier = DateTimeUtil.now().minus(10 * 3600).toDate();
    long count = repositoryService.createDeploymentQuery().deploymentBefore(later).count();
    assertEquals(2, count);
    count = repositoryService.createDeploymentQuery().deploymentBefore(earlier).count();
    assertEquals(0, count);
    try {
        repositoryService.createDeploymentQuery().deploymentBefore(null);
        fail("Exception expected");
    } catch (NullValueException e) {
    // expected
    }
}
Also used : Date(java.util.Date) NullValueException(org.camunda.bpm.engine.exception.NullValueException)

Example 7 with NullValueException

use of org.camunda.bpm.engine.exception.NullValueException in project camunda-bpm-platform by camunda.

the class CompositeDbHistoryEventHandlerTest method testCompositeDbHistoryEventHandlerNonArgumentConstructorAddNullEvent.

public void testCompositeDbHistoryEventHandlerNonArgumentConstructorAddNullEvent() {
    CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler();
    try {
        compositeDbHistoryEventHandler.add(null);
        fail("NullValueException expected");
    } catch (NullValueException e) {
        assertTextPresent("History event handler is null", e.getMessage());
    }
}
Also used : CompositeDbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler) NullValueException(org.camunda.bpm.engine.exception.NullValueException)

Example 8 with NullValueException

use of org.camunda.bpm.engine.exception.NullValueException in project camunda-bpm-platform by camunda.

the class CompositeDbHistoryEventHandlerTest method testCompositeDbHistoryEventHandlerArgumentConstructorWithNullVarargs.

public void testCompositeDbHistoryEventHandlerArgumentConstructorWithNullVarargs() {
    HistoryEventHandler historyEventHandler = null;
    try {
        new CompositeDbHistoryEventHandler(historyEventHandler);
        fail("NullValueException expected");
    } catch (NullValueException e) {
        assertTextPresent("History event handler is null", e.getMessage());
    }
}
Also used : HistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler) CompositeDbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler) CompositeDbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler) NullValueException(org.camunda.bpm.engine.exception.NullValueException)

Example 9 with NullValueException

use of org.camunda.bpm.engine.exception.NullValueException in project camunda-bpm-platform by camunda.

the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerNonArgumentConstructorAddNullEvent.

public void testCompositeHistoryEventHandlerNonArgumentConstructorAddNullEvent() {
    CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler();
    try {
        compositeHistoryEventHandler.add(null);
        fail("NullValueException expected");
    } catch (NullValueException e) {
        assertTextPresent("History event handler is null", e.getMessage());
    }
}
Also used : CompositeHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler) NullValueException(org.camunda.bpm.engine.exception.NullValueException)

Example 10 with NullValueException

use of org.camunda.bpm.engine.exception.NullValueException in project camunda-bpm-platform by camunda.

the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerArgumentConstructorWithNullVarargs.

public void testCompositeHistoryEventHandlerArgumentConstructorWithNullVarargs() {
    HistoryEventHandler historyEventHandler = null;
    try {
        new CompositeHistoryEventHandler(historyEventHandler);
        fail("NullValueException expected");
    } catch (NullValueException e) {
        assertTextPresent("History event handler is null", e.getMessage());
    }
}
Also used : CompositeHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler) DbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler) HistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler) CompositeHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler) NullValueException(org.camunda.bpm.engine.exception.NullValueException)

Aggregations

NullValueException (org.camunda.bpm.engine.exception.NullValueException)18 Test (org.junit.Test)7 InvalidRequestException (org.camunda.bpm.engine.rest.exception.InvalidRequestException)3 ProcessInstanceQuery (org.camunda.bpm.engine.runtime.ProcessInstanceQuery)3 Deployment (org.camunda.bpm.engine.test.Deployment)3 Date (java.util.Date)2 BadUserRequestException (org.camunda.bpm.engine.BadUserRequestException)2 Batch (org.camunda.bpm.engine.batch.Batch)2 HistoricActivityInstance (org.camunda.bpm.engine.history.HistoricActivityInstance)2 CompositeDbHistoryEventHandler (org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler)2 CompositeHistoryEventHandler (org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler)2 HistoryEventHandler (org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler)2 ActivityInstance (org.camunda.bpm.engine.runtime.ActivityInstance)2 ProcessInstance (org.camunda.bpm.engine.runtime.ProcessInstance)2 Matchers.anyString (org.mockito.Matchers.anyString)2 HashMap (java.util.HashMap)1 FilterService (org.camunda.bpm.engine.FilterService)1 ProcessEngineConfiguration (org.camunda.bpm.engine.ProcessEngineConfiguration)1 TaskService (org.camunda.bpm.engine.TaskService)1 NotValidException (org.camunda.bpm.engine.exception.NotValidException)1