小编Sto*_*dIM的帖子

需要使用mockito测试apache poi excel

我编写了一个类来根据传递的数据创建工作簿。我现在正在编写模拟测试来测试我的方法。我不允许使用 powermock。以下是代码片段。

public class TalkDetailsToExcel extends AbstractXlsView {
    private static final ResourceBundle RESOURCE_BUNDLE = MessageResource.getResourceBundle();

    /**
     * Builds the {@link Workbook} containing {@link Talk} details and adds to the {@link Sheet}.
     *
     * @param model               the {@link Map} containing the {@link List} of {@link Talk}.
     * @param workbook            the Excel {@link Workbook} to which {@link Talk} needs to be added.
     * @param httpServletRequest  the {@link HttpServletRequest}
     * @param httpServletResponse the {@link HttpServletResponse}
     * @throws Exception          when adding talk details to …
Run Code Online (Sandbox Code Playgroud)

java junit spring mockito apache-poi

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

apache-poi ×1

java ×1

junit ×1

mockito ×1

spring ×1