12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- package com.flow;
- //import com.flow.converter.ExcelToPdfConverter;
- import com.flow.model.ExecSql;
- import com.flow.service.ReportDatasourceService;
- import org.flowable.engine.HistoryService;
- import org.flowable.engine.TaskService;
- import org.junit.Test;
- import org.junit.runner.RunWith;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.boot.test.context.SpringBootTest;
- import org.springframework.test.context.junit4.SpringRunner;
- import java.io.FileInputStream;
- import java.io.FileOutputStream;
- import java.util.List;
- import java.util.Map;
- import static org.junit.Assert.assertEquals;
- @SpringBootTest(classes = FlowApplication.class)
- @RunWith(SpringRunner.class)
- public class FlowApplicationTest {
- // @Autowired
- // private TaskService taskService;
- // @Autowired
- // private HistoryService historyService;
- // @Autowired
- // private ReportDatasourceService reportDatasourceService;
- @Test
- public void testExample() {
- assertEquals(2, 1 + 1);
- }
- /* @Test
- public void test() {
- ExecSql execSql = new ExecSql();
- execSql.setDatasourceId(1L);
- execSql.setSql("select * from report_datasource");
- List<Map<String, Object>> list = reportDatasourceService.execSql(execSql);
- System.out.println("list = " + list);
- }*/
- /* @Test
- public void testConvert() {
- String sourceFilePath = "d:/source.xlsx";
- String desFilePath = "d:/rest.pdf";
- try (
- FileInputStream inputStream = new FileInputStream(sourceFilePath);
- FileOutputStream outputStream = new FileOutputStream(desFilePath)
- ) {
- ExcelToPdfConverter excelToPdfConverter = new ExcelToPdfConverter();
- excelToPdfConverter.convert(inputStream, outputStream);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }*/
- }
|