mirror of
https://github.com/AdrianKuta/android-challange-adrian-kuta.git
synced 2025-07-02 04:28:00 +02:00
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:
@ -18,4 +18,5 @@ dependencies {
|
||||
implementation(libs.kotlinx.datetime)
|
||||
|
||||
testImplementation(libs.mockk.android)
|
||||
testImplementation(libs.kotlinx.coroutines.test)
|
||||
}
|
||||
|
Reference in New Issue
Block a user