-
Notifications
You must be signed in to change notification settings - Fork 1
알림에 BigTextStyle 적용 #730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
알림에 BigTextStyle 적용 #730
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
core/util/src/test/java/com/ku_stacks/ku_ring/util/KuringNotificationManagerTest.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| package com.ku_stacks.ku_ring.util | ||
|
|
||
| import android.app.Notification | ||
| import android.app.NotificationManager | ||
| import android.content.Context | ||
| import android.content.Intent | ||
| import androidx.test.core.app.ApplicationProvider | ||
| import org.hamcrest.CoreMatchers.`is` | ||
| import org.hamcrest.MatcherAssert.assertThat | ||
| import org.junit.Test | ||
| import org.junit.runner.RunWith | ||
| import org.robolectric.RobolectricTestRunner | ||
| import org.robolectric.Shadows.shadowOf | ||
|
|
||
| @RunWith(RobolectricTestRunner::class) | ||
| class KuringNotificationManagerTest { | ||
|
|
||
| @Test | ||
| fun `showCustomNotification sets body as big text`() { | ||
| val context = ApplicationProvider.getApplicationContext<Context>() | ||
| val body = "오늘 19:30 녹색지대 공연 시작\n\nHearts2Hearts\nJANNABI\nZICO" | ||
|
|
||
| KuringNotificationManager.showCustomNotification( | ||
| context = context, | ||
| intent = Intent(), | ||
| title = "녹색지대 DAY1", | ||
| body = body, | ||
| largeIconRes = 0, | ||
| smallIconRes = 0, | ||
| ) | ||
|
|
||
| val notificationManager = | ||
| context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager | ||
| val notification = shadowOf(notificationManager).allNotifications.single() | ||
|
|
||
| assertThat( | ||
| notification.extras.getCharSequence(Notification.EXTRA_BIG_TEXT).toString(), | ||
| `is`(body), | ||
| ) | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: ku-ring/KU-Ring-Android
Length of output: 164
🏁 Script executed:
Repository: ku-ring/KU-Ring-Android
Length of output: 2776
🏁 Script executed:
Repository: ku-ring/KU-Ring-Android
Length of output: 1499
🏁 Script executed:
Repository: ku-ring/KU-Ring-Android
Length of output: 4091
🏁 Script executed:
Repository: ku-ring/KU-Ring-Android
Length of output: 635
JUnit4 API 대신 JUnit5로 마이그레이션하세요.
현재 코드는 JUnit4의
org.junit.Test,@RunWith등을 사용하고 있으나, 코딩 규약**/*Test.kt에 따라 JUnit5 기반으로 통일해야 합니다.프로젝트의
gradle/libs.versions.toml에 JUnit5(6.0.3)와 android-junit5 플러그인이 정의되어 있으므로, 다음과 같이 마이그레이션합니다:import org.junit.Test→import org.junit.jupiter.api.Test@RunWith(RobolectricTestRunner::class)→@ExtendWith(RobolectricExtension::class)또는 플러그인 활성화 후 직접 사용참고: 현재 프로젝트의 모든 테스트 파일이 JUnit4를 사용 중이므로, 이 파일의 수정은 프로젝트 전반적인 JUnit5 마이그레이션의 일부입니다. 빌드 설정의 android-junit5 플러그인 활성화와 unit-test 의존성 번들 수정도 함께 검토하세요.
🤖 Prompt for AI Agents