SPRING/chapter04_MVC

BoardAttachMapperTests.java

GAWON 2023. 7. 18. 09:37
package org.joonzis.mapper;


import java.util.List;

import org.joonzis.domain.BoardAttachVO;
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 lombok.Setter;
import lombok.extern.log4j.Log4j;

@Log4j
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("file:src/main/webapp/WEB-INF/spring/root-context.xml")
public class BoardAttachMapperTests {

	@Setter(onMethod_ = @Autowired)
	BoardAttachMapper mapper;
	
	/*
	@Test
	public void testfindByBno() {
		List<BoardAttachVO> list = mapper.findByBno(1);
		for(BoardAttachVO vo : list) {
			log.info(vo);
		}
	}
	
	*/
	/*
	@Test
	public void testInsert() {
		BoardAttachVO vo = new BoardAttachVO();
		vo.setUuid("다른이름");
		vo.setUploadPath("다운로드");
		vo.setFileName("파일이름");
		vo.setBno(1);
		mapper.insert(vo);
		log.info(vo);
		
	}
	*/
	
	@Test
	public void testDelete() {
		 mapper.delete("아이디");
		 
	}
	
	
}