Whiteship
  • Home
  • 인프런 강의
  • Java
  • Spring
  • JPA
  • SDE Tips
Subscribe
Tagged

Setup

A collection of 1 post

@Before

JUnit에서 setUp() 또는 @Before를 사용하는 이유?

참조: http://stackoverflow.com/questions/512184/best-practice-initialize-junit-class-fields-in-setup-or-at-declaration JUnit은 각각의 테스트를 독립적으로 테스트하기 위해 테스트 마다 개별적인 객체를 생성합니다. 따라서.. public class SomeTest extends TestCase {    private final List list = new ArrayList();     public void testPopulateList()    {        // Add stuff to the list    

  • 백기선
백기선 Mar 27, 2009 • 2 min read
Whiteship © 2022
Powered by Ghost