package cn.gtmap.estateplat.config.service.core.impl.validator;

import cn.gtmap.estateplat.config.BaseTest;
import cn.gtmap.estateplat.config.core.model.BdcForceValidate;
import cn.gtmap.estateplat.config.service.ProjectCheckInfoService;
import cn.gtmap.estateplat.config.service.core.ProjectValidateService;
import cn.gtmap.estateplat.config.service.impl.ProjectCheckInfoServiceImpl;
import cn.gtmap.estateplat.model.server.core.Project;
import junit.framework.TestCase;
import org.apache.commons.collections.map.LinkedMap;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.HashMap;
import java.util.Map;
import java.util.logging.Handler;

import static org.junit.Assert.*;

/**
 * @version 1.0, 2017/7/5.
 * @auto <a href="mailto:zhouwanqing@gtmap.cn">zhouwanqing</a>
 * @description
 */

public class BdcdyCdQxValidateServiceImplTest extends BaseTest {
    @Autowired
    ProjectCheckInfoService projectCheckInfoService;

    @Test
    public void validate() throws Exception {
        HashMap hashMap = new HashMap();
        Project project = new Project();
        project.setBdcdyh("320508023054GB18804F00040204");
        hashMap.put("project", project);
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:conf/spring/app-validate.xml");
        ProjectCheckInfoServiceImpl projectCheckInfoService = applicationContext.getBean("projectCheckInfoService", ProjectCheckInfoServiceImpl.class);
        ProjectValidateService projectValidateService = projectCheckInfoService.getProjectValidateServiceByCheckCode("136");
        projectValidateService.validate(hashMap);
        System.out.print("12232");

    }

}