package kr.co.jinwoosi.clfd.clfd.dgns.mapper;

import kr.co.jinwoosi.clfd.clfd.dgns.model.SkTy;
import kr.co.jinwoosi.clfd.clfd.dgns.model.SkTySearch;
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 java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {
        "classpath:config/spring/context-datasource.xml",
        "classpath:config/spring/context-mybatis.xml",
        "classpath:config/spring/context-common.xml",
        "classpath:config/spring/context-transaction.xml"
})
public class SkTyMapperTest {

    @Autowired
    private SkTyMapper skTyMapper;

    @Test
    public void skTyMapperTest() {
        SkTy skTy = skTyMapper.select(new SkTySearch("DSNT"));
        System.out.println(skTy.toString());
    }

    @Test
    public void selectListTest() {
        List<SkTy> skTyList = skTyMapper.selectList(new SkTySearch());
        skTyList.forEach(skTy -> System.out.println(skTy.toString()));
    }
}
