Created
July 4, 2023 09:06
-
-
Save KwabenBerko/7628864e16532525dd3508fe926c018e to your computer and use it in GitHub Desktop.
Plain Component Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@OptIn(ExperimentalCoroutinesApi::class) | |
class PlainComponentTest { | |
@Test | |
fun `should call refresh function multiple times`() = runTest { | |
val jobs = mutableListOf<Job>() | |
val component = PlainComponent() | |
repeat(10){ | |
jobs += launch { component.refresh() } | |
} | |
jobs.joinAll() | |
assertEquals(10, component.refreshesCount) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment