Skip to content

Instantly share code, notes, and snippets.

@EricDw
Created November 21, 2018 03:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EricDw/53d10738dcb7c5e5d8ffcd3b52a1c0ba to your computer and use it in GitHub Desktop.
Save EricDw/53d10738dcb7c5e5d8ffcd3b52a1c0ba to your computer and use it in GitHub Desktop.
A Unit Test demostrating how I expected the Pipeline Interface to look.
@Test
fun given_1_when_send_then_string_of_1() {
// Arrange
val input: Int = 1
val expected: String = "1"
lateinit var actual: String
// Act
CoroutineTestingScope.launch {
intToStringPipeline.send(input)
actual = intToStringPipeline.receive()
}
// Assert
Assert.assertEquals(expected, actual)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment