本文整理汇总了Java中org.sejda.model.output.TaskOutput类的典型用法代码示例。如果您正苦于以下问题:Java TaskOutput类的具体用法?Java TaskOutput怎么用?Java TaskOutput使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TaskOutput类属于org.sejda.model.output包,在下文中一共展示了TaskOutput类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onTaskExecutionRequest
import org.sejda.model.output.TaskOutput; //导入依赖的package包/类
@Test
public void onTaskExecutionRequest() throws TaskOutputVisitException {
AbstractParameters params = mock(AbstractParameters.class);
TaskExecutionRequestEvent event = new TaskExecutionRequestEvent(MODULE_ID, params);
TaskOutput output = mock(FileTaskOutput.class);
when(params.getOutput()).thenReturn(output);
eventStudio().broadcast(event);
assertFalse(victim.lookup(".footer-failed-button").isVisible());
assertFalse(victim.lookup(".footer-open-button").isVisible());
assertTrue(victim.lookup(".status-label").isVisible());
assertEquals(DefaultI18nContext.getInstance().i18n("Requested"),
((Labeled) victim.lookup(".status-label")).getText());
assertEquals(0, ((ProgressBar) victim.lookup(".pdfsam-footer-bar")).getProgress(), 0.01);
verify(output).accept(any());
}
示例2: onTaskExecutionRequestDifferentModule
import org.sejda.model.output.TaskOutput; //导入依赖的package包/类
@Test
public void onTaskExecutionRequestDifferentModule() {
AbstractParameters params = mock(AbstractParameters.class);
TaskExecutionRequestEvent event = new TaskExecutionRequestEvent("AnotherModule", params);
TaskOutput output = mock(FileTaskOutput.class);
when(params.getOutput()).thenReturn(output);
eventStudio().broadcast(event);
assertFalse(victim.lookup(".status-label").isVisible());
}
示例3: setUp
import org.sejda.model.output.TaskOutput; //导入依赖的package包/类
@Before
public void setUp() {
victim = new MultiplePdfSourceParameters() {
@Override
public TaskOutput getOutput() {
return null;
}
};
}
示例4: createTemporaryBuffer
import org.sejda.model.output.TaskOutput; //导入依赖的package包/类
/**
* Creates a temp file trying to find the best location based on the task output.
*
* @param taskOut
* @return
* @throws TaskIOException
*/
public static File createTemporaryBuffer(TaskOutput taskOut) throws TaskIOException {
TmpBufferLocationFinder bufferLocationFinder = new TmpBufferLocationFinder();
try {
taskOut.accept(bufferLocationFinder);
File buffer = tmpFile(bufferLocationFinder.bufferLocation).toFile();
buffer.deleteOnExit();
return buffer;
} catch (TaskOutputVisitException | IOException e) {
throw new TaskIOException("Unable to create temporary buffer", e);
}
}
示例5: getOutput
import org.sejda.model.output.TaskOutput; //导入依赖的package包/类
public TaskOutput<?> getOutput() {
return output;
}
示例6: getOutput
import org.sejda.model.output.TaskOutput; //导入依赖的package包/类
/**
* @return output destination where the result of the manipulation is placed
*/
TaskOutput getOutput();