Skip to content

Instantly share code, notes, and snippets.

@tbelmega
Created April 27, 2019 09:11
Show Gist options
  • Save tbelmega/06cab3b0d21b430493fdc4ba0ce92b2a to your computer and use it in GitHub Desktop.
Save tbelmega/06cab3b0d21b430493fdc4ba0ce92b2a to your computer and use it in GitHub Desktop.
@Test
fun `findMostOrderedProducts - 6 orders for 3 products in db - returns Top 2`() {
// given
// when
val foundProducts = productRepository.findMostOrderedProducts(numberOfProducts)
// then
assertThat(foundProducts).hasSize(numberOfProducts)
assertThat(foundProducts).containsExactlyInAnyOrder(product1, product2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment