package com.live.utils.pddtest;

import com.live.jdbc.dao.DataDao;
import com.live.jdbc.entity.ApiInfo;
import com.live.jdbc.entity.UserInfo;
import com.live.utils.SpringContextUtil;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/**
 * @Auther: pdd
 * @Date: 2021/04/27/14:14
 * @Description:
 */
public class JDBCTest  {

   /* @BeforeMethod
    public void beforeTest() {
        xmAppApi.setApiModule(ApiModule.God_B) // API 所属模块
                .setApiName("API_saveStudent") // API 名称
                //.setLoginUser("pdd-b")         // http 接口，测试账号
                //.setTerminal(Terminal.B);             // 所属端位（B端，C端，M端等, 必传）
                .setLoginUser("祁海洋_dev")
                .setTerminal(Terminal.APP_C)
                .setEnv("dev");

        dal.setCase_owner("pengdan")
                .setCase_name(Thread.currentThread().getStackTrace()[1].getFileName().split("\\.")[0]);
        super.beforeTest();
    }*/
   /* @Test*/
    public  void test() {

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");

        DataDao dataDao = (DataDao) SpringContextUtil.getBean("dataDao");
        UserInfo info = dataDao.getUserInfo("祁海洋_dev", "dev");
        System.out.println(info.toString());

        ApiInfo info2 = dataDao.getApiInfo("god_order_api", "API_order_payVoucher");
        System.out.println(info2.toString());

    }
}
