diff --git a/README.md b/README.md index 62d58b4..31717ae 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Add the dependency to your `build.gradle` (Gradle Groovy): ```gradle dependencies { - androidTestImplementation 'io.github.danielepantaleone:kttestexpectation:1.0.2' + androidTestImplementation 'io.github.danielepantaleone:kttestexpectation:1.1.0' } ``` @@ -37,7 +37,7 @@ or `build.gradle.kts` (Kotlin DSL): ```gradle dependencies { - androidTestImplementation("io.github.danielepantaleone:kttestexpectation:1.0.2") + androidTestImplementation("io.github.danielepantaleone:kttestexpectation:1.1.0") } ``` @@ -108,6 +108,26 @@ fun testAwaitMultipleExpectations() { } ``` +Awaiting on multiple expectations of different types: + +```kotlin +@Test +fun testAwaitMultipleExpectationsWithMixedTypes() { + val expectation1 = expectation("Expectation 1") + val expectation2 = expectation("Expectation 2") { // no need to manually fulfill() + somePredicateThatWillEventuallyEvaluateToTrue() + } + asyncLongOperationWithCallback { + expectation1.fulfill() + } + waitForExpectations( + expectations = listOf(expectation1, expectation2), + time = 60, + unit = TimeUnit.SECONDS + ) +} +``` + ## Contributing If you like this project you can contribute it by: diff --git a/kttestexpectation/build.gradle b/kttestexpectation/build.gradle index 7144ede..e5562c7 100644 --- a/kttestexpectation/build.gradle +++ b/kttestexpectation/build.gradle @@ -9,7 +9,7 @@ android { compileSdk 34 defaultConfig { minSdk 23 - versionName "1.0.2" + versionName "1.1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" }