본문 바로가기 메뉴 바로가기

직접 해본거만 적음

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

직접 해본거만 적음

검색하기 폼
  • 분류 전체보기 (97)
    • spring(boot) (23)
      • batch (4)
      • junit (2)
    • DB (9)
    • 개발 (16)
    • java (5)
    • algorithm (10)
    • docker (16)
    • javascript (3)
    • 돈계산 (1)
    • CS (0)
    • C# (4)
  • 방명록

spring(boot)/junit (2)
몇가지

@SpringBootTest 유무 @SpringBootTest를 달고 테스트 돌리면 서버가 돌고 안달고 돌리면 서버없이 테스트 돔 순서 @TestMethodOrder(MethodOrderer.MethodName.class): 메서드 알파벳 순서 @TestMethodOrder(OrderAnnotation.class): @Order(n)의 n순서 import org.junit.jupiter.api.MethodOrderer.OrderAnnotation; @TestMethodOrder(OrderAnnotation.class) public class CommonUtilTest { ... @Order(1) ... public void isNullStringsTrue(String x) { ... } @TestMeth..

spring(boot)/junit 2023. 5. 21. 16:43
[junit]save후 findById로 찾을때 못찾을 경우

문제 책보면서 Repository 테스트 작성 중. @DataJpaTest @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class ...RepositoryTest { @Autowired private ...Repository ...Repository; @BeforeAll public void setup() { Problem problem = new Problem(); problem.setProblemNo(101L); problem.setQuestion("question101"); problem.setAnswer("answer101"); problem.setSolution("solution101"); problem.setVariables("variabl..

spring(boot)/junit 2022. 12. 11. 00:32
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바