package com.changda.test.cd4japp.sa.service;

import java.util.HashMap;
import java.util.Map;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.changda.cd4j.technique.dynexcute.service.interfaces.IExcuteDynSql;
import com.changda.cd4j.technique.dynexcute.service.interfaces.IIocGetter;
import com.changda.cd4j.technique.ruleengine.interfaces.IFunctionGetter;
import com.changda.cd4japp.sa.service.IWorkFlowDemoService;
 

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations  = { "classpath:spring-context.xml", "classpath:spring-mvc.xml", "classpath:mybatis-config.xml"})  
public class ServiceCallTest {
	 @Autowired
     private IFunctionGetter functionGetter;
     @Autowired
     private  IExcuteDynSql excuteDynSql;
     @Autowired
     private   IIocGetter iIocGetter;
     
	@Autowired
	private IWorkFlowDemoService workflowdemoService;

//	@Test
//	public void testSeqWorkService() {
//
//		Map<String,Object> map=new HashMap<String,Object>();
//		Map<String,Object> outputmap=workflowdemoService.excuteSeqService(map,this.functionGetter,this.excuteDynSql,this.iIocGetter);
//		
//	}
	@Test
	public void testIfElseWorkService() {

		try
		{
		Map<String,Object> map=new HashMap<String,Object>();
		Map<String,Object> outputmap=workflowdemoService.excuteIfElseService(map,this.functionGetter,this.excuteDynSql,this.iIocGetter);
		 
		}
		catch(Exception ex)
		{
			String a=ex.getMessage();
			
			System.out.println(ex);
		}
	}
}
