Skip to content

Instantly share code, notes, and snippets.

@yairzaslavsky
Created September 16, 2019 07:07
Show Gist options
  • Save yairzaslavsky/98652c2c5aa1f427fb2a1e59cc90a9ba to your computer and use it in GitHub Desktop.
Save yairzaslavsky/98652c2c5aa1f427fb2a1e59cc90a9ba to your computer and use it in GitHub Desktop.
from test data to dynamic test
private fun ListBooksTestCase.`successful call to listBooks`(): DynamicTest {
return DynamicTest.dynamicTest(description) {
// Arrange
every {
itemsManager.getItems(testLibrary.identifier, ofNullable(maxResults), ofNullable(nextToken))
} returns (returnedItems)
//Act
val actualBooks = booksDataProvider.listBooks(testLibrary.identifier, maxResults, nextToken)
//Assert
assertEquals(expectedBooks, actualBooks)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment