package com.blueland.ebpm.engine.core.service;

import java.io.ByteArrayOutputStream;
import java.util.HashMap;

import com.blueland.bpm.engine.core.service.ProcessConfigService;
import com.blueland.ebpm.engine.BaseWfServiceTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;

import com.blueland.bpm.engine.config.model.ActivityInfoConfig;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * 流程管理配置Service
 * @version:  1.0
 * @author lw 
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class ProcessConfigServiceTest extends BaseWfServiceTest {
	@Autowired
    ProcessConfigService processConfigServiceImpl;
	@Test
	public void getWorkflowPage(){
		
	}
	
	
	@Test
	public void findProcessInfoConfigs(){
		
	}
	@Test
	public void  exportAllRoleData() {
		ByteArrayOutputStream byteArrayOutputStream=processConfigServiceImpl.exportAllRoleData("DEMO_SYS");
		System.out.println(new String(byteArrayOutputStream.toByteArray()));
		processConfigServiceImpl.importAllRoleData(new String(byteArrayOutputStream.toByteArray()));
	}
	
	@Test
	public void getActivityInfoConfig() {
		ActivityInfoConfig activityInfoConfig=processConfigServiceImpl.getActivityInfoConfig("cbCompanySend:1:26616", "usertask2", "2",new HashMap());
		System.out.println(activityInfoConfig);
	}
	
}
