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
}
}
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());
}
}
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());
}
}
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());
}
}
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());
}
}
Aggregations