Skip to content

Comments

Write Test Code In 'core.domain' package#1359

Open
squart300kg wants to merge 24 commits intoandroid:mainfrom
squart300kg:Issue1327/ImproveDomainCoverage
Open

Write Test Code In 'core.domain' package#1359
squart300kg wants to merge 24 commits intoandroid:mainfrom
squart300kg:Issue1327/ImproveDomainCoverage

Conversation

@squart300kg
Copy link
Contributor

@squart300kg squart300kg commented Apr 3, 2024

[What I have done and why]
write test code named 'GetRecentSearchQueriesUseCaseTest' in 'core.comain' package

[why i have done]
JoseAlcerreca raised issue numbered #1327.

[note]
#1327 issue completion need to write 3 class test code additionaly. Firstly, i write one class of them. so If this code is appropriate and merged, i will try one pull request containing the rest of 2 class test code.

if this code is inappropriate, please feed back for me. I will gladly accept your opinion. Thanks : )

Fixes #1327

How I'm testing it

Choose at least one:

  • Unit tests
  • UI tests
  • Screenshot tests
  • N/A (provide justification)

Do tests pass?

  • Run local tests on DemoDebug variant: ./gradlew testDemoDebug
  • Check formatting: ./gradlew --init-script gradle/init.gradle.kts spotlessApply

Is this your first pull request?

Change-Id: Ia1d9049642e447d9233713a7e3ee593d0bd56930
Change-Id: I2a818503cffc458085e7aee04c2c12d9df532b3c
android#1327])

Change-Id: I392a1e3ebcbc8bc30623559d97c1657e5d50fbbc
@squart300kg
Copy link
Contributor Author

squart300kg commented Apr 5, 2024

@JoseAlcerreca
I acceped your feedback and pull request again. so, when you have time, I would like you to review my updated code.

Thanks : )

Change-Id: I0df074b9d3b6161ff57e13f277d3af04babf3b27
Change-Id: I9e00d849b34bc6ff6390bdafd934740ab16172bf
Change-Id: I2ade29d0850206020ef69520f6e250de39dcef6d
Change-Id: I80c3c7132e87ba8d770f4eac9904671725b02265
Change-Id: I2201d548a4596f3040d81130f5ac53f29f7f034b
…bleList' to 'MutableSharedFlow'

Change-Id: Ic7f914d5a3963812d0647a2f0b89f732f2d4188c
…7/ImproveDomainCoverage

Change-Id: Ib862b1fc9f0044c86146206ae1c8ff9f1fe1571c

# Conflicts:
#	core/testing/src/main/kotlin/com/google/samples/apps/nowinandroid/core/testing/repository/TestRecentSearchRepository.kt
Change-Id: If3ee12b2a4ddb3baec0e4e990b721526104dbc99
@squart300kg squart300kg requested a review from dturner August 22, 2025 01:03
Copy link
Contributor

@Jaehwa-Noh Jaehwa-Noh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this naming is a better than previous name.

)

@Test
fun whenQueryLimitIsBy10_recentSearchQueriesAreReturnedUpTo10() = runTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fun whenQueryLimitIsBy10_recentSearchQueriesAreReturnedUpTo10() = runTest {
fun query_overTen_showUpTenHistories() = runTest {

}

@Test
fun whenReceivingRecentSearchQueries_recentSearchQueriesAreReturnedInRecentOrder() = runTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fun whenReceivingRecentSearchQueries_recentSearchQueriesAreReturnedInRecentOrder() = runTest {
fun query_overTen_showUpRecentTenResults() = runTest {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Testing FR] [core:domain] Improve coverage

6 participants