Skip to content

Instantly share code, notes, and snippets.

@isidore
Created January 14, 2022 00:37
Show Gist options
  • Save isidore/d0ae6335dcb98905e47775877fb5e1a3 to your computer and use it in GitHub Desktop.
Save isidore/d0ae6335dcb98905e47775877fb5e1a3 to your computer and use it in GitHub Desktop.
import org.approvaltests.combinations.CombinationApprovals
import org.junit.jupiter.api.Test
import org.lambda.functions.Function2
class InlineTest {
@Test
internal fun testInline() {
val numbers = arrayOf(10, 20, 30, 40, 50)
CombinationApprovals.verifyAllCombinations(Combine(), numbers, numbers)
}
class Combine:Function2<Int, Int, String>{
override fun call(a: Int?, b: Int?): String {
return "$a + $b"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment