當前位置: 首頁>>代碼示例>>Java>>正文


Java NotifiableTaskMetadata.NULL屬性代碼示例

本文整理匯總了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());
}
 
開發者ID:torakiki,項目名稱:sejda,代碼行數:17,代碼來源:NotificationContextTest.java

示例2: percentageConstructor

@Test
public void percentageConstructor() {
    PercentageOfWorkDoneChangedEvent victim = new PercentageOfWorkDoneChangedEvent(BigDecimal.ONE,
            NotifiableTaskMetadata.NULL);
    assertEquals(BigDecimal.ONE, victim.getPercentage());
    assertFalse(victim.isUndetermined());
}
 
開發者ID:torakiki,項目名稱:sejda,代碼行數:7,代碼來源:PercentageOfWorkDoneChangedEventTest.java

示例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());
}
 
開發者ID:torakiki,項目名稱:sejda,代碼行數:9,代碼來源:NotificationContextTest.java

示例4: zeroPercentageConstructor

@Test
public void zeroPercentageConstructor() {
    PercentageOfWorkDoneChangedEvent victim = new PercentageOfWorkDoneChangedEvent(NotifiableTaskMetadata.NULL);
    assertEquals(BigDecimal.ZERO, victim.getPercentage());
    assertFalse(victim.isUndetermined());
}
 
開發者ID:torakiki,項目名稱:sejda,代碼行數:6,代碼來源:PercentageOfWorkDoneChangedEventTest.java

示例5: isUndetermined

@Test
public void isUndetermined() {
    PercentageOfWorkDoneChangedEvent victim = new PercentageOfWorkDoneChangedEvent(
            PercentageOfWorkDoneChangedEvent.UNDETERMINED, NotifiableTaskMetadata.NULL);
    assertTrue(victim.isUndetermined());
}
 
開發者ID:torakiki,項目名稱:sejda,代碼行數:6,代碼來源:PercentageOfWorkDoneChangedEventTest.java


注:本文中的org.sejda.model.task.NotifiableTaskMetadata.NULL屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。