package kr.co.jinwoosi.clfd.framework.cd.service;

import kr.co.jinwoosi.clfd.framework.cd.model.CdDtl;
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;

@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 CdDtlServiceTest {
    @Autowired
    private CdDtlService cdDtlService;

    @Test
    public void selectListTest() {
        CdDtl cdDtl = new CdDtl("dgnsTyCd");
        cdDtl.setSort("CD_DTL_ORD");
        cdDtl.setSortOrd("ASC");
        for (CdDtl dtl : cdDtlService.selectList(cdDtl)) {
            System.out.println(dtl.toString());
        }
    }
}
