如何为下面的代码编写junit和mockito

时间:2018-07-24 09:07:33

标签: java junit

List<Long> IDList = new ArrayList<Long>();

    try(Stream<TransactionEntity> retailRecordStram = retailRepository.streamAllShareRecords(currentDateTime.substring(0, 6) +"18")){
        RecordCount = 0;
        retailRecordStram.forEach(LambdaExceptionUtil.rethrowConsumer(Entity -> {
            String Record = ReportUtil.generateRecord(Entity);
            FileWriter.println(Record);
    IDList.add(Entity.getRetailTransactionID());//fecting the records and adding in list
            RecordCount++;
        }));
        FileWriter.flush();

有必要为流编写junit和mockito

0 个答案:

没有答案