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

import kr.co.jinwoosi.clfd.clfd.prod.model.ProdLike;
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 ProdLikeServiceTest {
    @Autowired
    private ProdLikeService prodLikeService;

    @Test
    public void insertTest() {
        ProdLike prodLike = new ProdLike();
        prodLikeService.insert(1L, 164L);
        System.out.println(prodLike.getProdLikeId());
    }

    @Test
    public void deleteTest() {
        prodLikeService.delete(1L, 176L);
    }

    @Test
    public void selectTest() {
        ProdLike select = prodLikeService.select(1L, 176L);
        System.out.println(select.toString());
    }
}
