728x90
반응형
Replace JUnit assertThat with Hamcrest | jSparrow Documentation
Replace JUnit assertThat with Hamcrest Description The JUnit Assert.assertThat (opens new window) method is deprecated. Its sole purpose is to forward the call to the MatcherAssert.assertThat (opens new window) method defined in Hamcrest 1.3. Therefore, it
jsparrow.github.io
Hamcrest를 다시 사용해보려고 하던 중
assertThat이 Deprecated 되었다는 것을 알게 되었습니다. 🥲
// 이전 코드
import org.junit.Assert.*
// 사용 코드
assertThat(result, `is`(true))
그래서 공식 문서 등을 찾아보니 Deprecated된 JUnit의 assertThat을 대신하여
Hamcrest 1.3에서 제공해준다고 하네요~. 👍🏻
// 새로운 코드
import org.hamcrest.MatcherAssert.assertThat
// 사용 코드
assertThat(result, `is`(true))
반응형
'Android > Android' 카테고리의 다른 글
[Compose Internal] changed 예시 코드 분석 (0) | 2024.11.07 |
---|---|
[Android] 실행시점에 Permission 요청하기 (0) | 2023.04.23 |
[Android] 2023 Google Play Policy Bytes (0) | 2023.04.12 |
[Compose] Custom BoxShadow를 만들어보자! (1) | 2023.04.04 |
[Compose] Font에 적용되는 Padding 제거하기 (0) | 2023.04.04 |