private void processSMimeEncryptedMessageAndCaptureMocks(
Message message, Body encryptedBody, OutputStream outputStream)
throws Exception {
messageCryptoHelper.asyncStartOrResumeProcessingMessage(message, messageCryptoCallback,
null, null, false);
ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
ArgumentCaptor<SMimeDataSource> dataSourceCaptor = ArgumentCaptor.forClass(SMimeDataSource.class);
ArgumentCaptor<ISMimeSinkResultCallback> callbackCaptor = ArgumentCaptor.forClass(
ISMimeSinkResultCallback.class);
verify(sMimeApi).executeApiAsync(intentCaptor.capture(), dataSourceCaptor.capture(),
any(SMimeDataSink.class), callbackCaptor.capture());
capturedApiIntent = intentCaptor.getValue();
capturedSMimeCallback = callbackCaptor.getValue();
SMimeDataSource dataSource = dataSourceCaptor.getValue();
dataSource.writeTo(outputStream);
verify(encryptedBody).writeTo(outputStream);
}
MessageCryptoHelperTest.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:q-mail
作者:
评论列表
文章目录