Skip to content

Instantly share code, notes, and snippets.

@yairzaslavsky
Created September 16, 2019 07:08
Show Gist options
  • Save yairzaslavsky/1dba4ed759dbf2ded5a2a6d95bc293f1 to your computer and use it in GitHub Desktop.
Save yairzaslavsky/1dba4ed759dbf2ded5a2a6d95bc293f1 to your computer and use it in GitHub Desktop.
Test factory function.kt
@TestFactory
fun `successful call to listBooks`(): List<DynamicTest> =
listOf(
ListBooksTestCase(
"Getting list of items",
testLibrary.identifier,
itemsList(book1.toItem(), book2.toItem()),
booksList(book1, book2)
),
ListBooksTestCase(
"Getting empty list",
testLibrary.identifier,
itemsList(),
booksList()
)
).map {
it.`successful call to listBooks`()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment