Test: Add unit tests for repository use cases

This commit introduces unit tests for the following use cases in the repository layer:
- `ObserveAirportsUseCaseImpl`
- `GetFlightsSearchContentUseCaseImpl`
- `GetConnectionsForAirportUseCaseImpl`

Key changes:
- Added `ObserveAirportsUseCaseImplTest.kt` with tests for observing airport data, including scenarios with valid data, empty data, null data, and cache refresh.
- Added `GetFlightsSearchContentUseCaseImplTest.kt` with tests for searching flights, covering valid responses and responses with null values.
- Added `GetConnectionsForAirportUseCaseImplTest.kt` with tests for fetching airport connections, including scenarios with valid responses, empty responses, responses with null airport codes/names, and multiple route responses.
- Added `kotlinx-coroutines-test` dependency to `model/repository/build.gradle.kts` for testing coroutines.
This commit is contained in:
2025-06-16 00:55:12 +02:00
parent e8ac7c5596
commit 8ce553240c
4 changed files with 771 additions and 0 deletions

View File

@ -18,4 +18,5 @@ dependencies {
implementation(libs.kotlinx.datetime)
testImplementation(libs.mockk.android)
testImplementation(libs.kotlinx.coroutines.test)
}