Skip to content

Commit

Permalink
@DirtiesContext를 다시 넣어보자!
Browse files Browse the repository at this point in the history
  • Loading branch information
fp024 committed Feb 8, 2024
1 parent 801a034 commit a16a125
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@DirtiesContext
@SpringJUnitConfig(locations = {"classpath:applicationContext.xml"})
class PersonRepositoryTest {
@Autowired private PersonRepository personRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@DirtiesContext
@SpringJUnitConfig(locations = {"classpath:applicationContext.xml"})
class RegisterServiceTest {
@Autowired private RegisterService registerService;
Expand Down

0 comments on commit a16a125

Please sign in to comment.