Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix effect comparison in unit tests if number of effects is one #10

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/com/ouroboros/dependencies.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.ouroboros

object Libs {
const val androidGradlePlugin = "com.android.tools.build:gradle:8.4.1"
const val androidGradlePlugin = "com.android.tools.build:gradle:8.5.0"

const val junit = "junit:junit:4.13"

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Thu May 16 14:29:48 CEST 2024
#Wed Jul 31 08:39:04 CEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import kotlin.test.junit.JUnitAsserter.assertEquals
import kotlin.test.junit.JUnitAsserter.assertTrue

class EffectMatching<E>(
capturedEvents: Set<E>
capturedEvents: Set<E>,
) {
private var eventsAccessed = false

Expand All @@ -15,7 +15,7 @@ class EffectMatching<E>(
}

fun expectEvents(vararg events: E) {
assertEquals("Expected events to be $events", events.toSet(), emittedEvents)
assertEquals("Expected events to be $events", events.toSet(), emittedEvents.toSet())
}

fun expectNoEvents() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ infix fun <F : ExecutableEffect<E, S>, E, S> F.runWith(state: S): EffectResult<E

fun <F : ExecutableEffect<E, S>, E, S> F.runWith(
state: S,
context: CoroutineContext
context: CoroutineContext,
): EffectResult<E> {
val eventConsumer = TestConsumer<E>()

Expand Down
Loading