Skip to content

Commit

Permalink
Merge branch 'frontend' into database-design
Browse files Browse the repository at this point in the history
  • Loading branch information
thebeo2004 committed Dec 8, 2024
2 parents 8943784 + fd54f20 commit 1364d52
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/test_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,11 @@ jobs:
run: chmod +x ./gradlew

- name: Execute Gradle command - unitTest
run: ./gradlew testDebugUnitTest
run: ./gradlew testDebugUnitTest --continue

- name: Upload Test Reports
if: ${{ always() }}
uses: actions/[email protected]
with:
name: test-reports
path: '**/build/reports/tests/'
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import com.example.harmonyhub.data.network.*
import com.example.harmonyhub.data.network.Response
import com.example.harmonyhub.data.repository.DefaultHomeScreenRepo
import kotlinx.coroutines.runBlocking
import okhttp3.*
import org.junit.Assert.*
import org.junit.Before
import org.junit.Test
import java.io.IOException

class DefaultHomeScreenRepoTest {

private lateinit var repo: DefaultHomeScreenRepo

@Before
fun setUp() {
repo = DefaultHomeScreenRepo()
}

@Test
fun `test updatePopularItem success`() = runBlocking {
var result = repo.updatePopularItem()
assertNotNull(result)
assertEquals(result!!.listPopularAlbums!!.size, 9)
assertEquals(result!!.listPopularArtist!!.size, 10)
assertEquals(result!!.listChart!!.size, 6)
}
}

0 comments on commit 1364d52

Please sign in to comment.