本文整理匯總了Java中org.sejda.model.task.NotifiableTaskMetadata.NULL屬性的典型用法代碼示例。如果您正苦於以下問題:Java NotifiableTaskMetadata.NULL屬性的具體用法?Java NotifiableTaskMetadata.NULL怎麽用?Java NotifiableTaskMetadata.NULL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.sejda.model.task.NotifiableTaskMetadata
的用法示例。
在下文中一共展示了NotifiableTaskMetadata.NULL屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testNotificationContextNotify
private void testNotificationContextNotify(NotificationContext victim) {
TestListenerPercentage listener = newPercentageListener();
TestListenerAny<PercentageOfWorkDoneChangedEvent> secondListener = newGeneralListener();
TestListenerAny<TaskExecutionFailedEvent> thirdListener = newGeneralListener();
victim.addListener(listener);
victim.addListener(PercentageOfWorkDoneChangedEvent.class, secondListener);
victim.addListener(TaskExecutionFailedEvent.class, thirdListener);
BigDecimal value = new BigDecimal("32");
PercentageOfWorkDoneChangedEvent event = new PercentageOfWorkDoneChangedEvent(value,
NotifiableTaskMetadata.NULL);
assertFalse(event.isUndetermined());
victim.notifyListeners(event);
assertEquals(value, listener.getPercentage());
assertFalse(listener.isUndeterminate());
assertTrue(secondListener.hasListened());
assertFalse(thirdListener.hasListened());
}
示例2: percentageConstructor
@Test
public void percentageConstructor() {
PercentageOfWorkDoneChangedEvent victim = new PercentageOfWorkDoneChangedEvent(BigDecimal.ONE,
NotifiableTaskMetadata.NULL);
assertEquals(BigDecimal.ONE, victim.getPercentage());
assertFalse(victim.isUndetermined());
}
示例3: testNotificationContextUndetermined
private void testNotificationContextUndetermined(NotificationContext victim) {
TestListenerPercentage listener = newPercentageListener();
victim.addListener(listener);
PercentageOfWorkDoneChangedEvent event = new PercentageOfWorkDoneChangedEvent(
PercentageOfWorkDoneChangedEvent.UNDETERMINED, NotifiableTaskMetadata.NULL);
assertTrue(event.isUndetermined());
victim.notifyListeners(event);
assertTrue(listener.isUndeterminate());
}
示例4: zeroPercentageConstructor
@Test
public void zeroPercentageConstructor() {
PercentageOfWorkDoneChangedEvent victim = new PercentageOfWorkDoneChangedEvent(NotifiableTaskMetadata.NULL);
assertEquals(BigDecimal.ZERO, victim.getPercentage());
assertFalse(victim.isUndetermined());
}
示例5: isUndetermined
@Test
public void isUndetermined() {
PercentageOfWorkDoneChangedEvent victim = new PercentageOfWorkDoneChangedEvent(
PercentageOfWorkDoneChangedEvent.UNDETERMINED, NotifiableTaskMetadata.NULL);
assertTrue(victim.isUndetermined());
}