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

import kr.co.jinwoosi.clfd.clfd.dgns.model.DgnsDtl;
import kr.co.jinwoosi.clfd.clfd.dgns.model.DgnsDtlSearch;
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 DgnsDtlServiceTest {

    @Autowired
    private DgnsDtlService dgnsDtlService;

    @Test
    public void selectLisTest() {
        for (DgnsDtl dgnsDtl : dgnsDtlService.selectList(new DgnsDtlSearch())) {
            System.out.println(dgnsDtl.toString());
        }
    }

    @Test
    public void selectTest() {
        DgnsDtl dgnsDtl = dgnsDtlService.select(new DgnsDtlSearch(1L));
        System.out.println(dgnsDtl.toString());
    }
}
