LeoColman
01/19/2019, 10:48 PMrobstoll
01/19/2019, 10:58 PMfinding tests
phase, I guess you have one but probably name it differently. Say you get a AccessDeniedException when accessing a test. This does not have to do anything with the test itself but with the infrastructure (e.g. your CI). JUnit5 would say it's all fine per default, that's why I wonder.
Regarding multi-platform, that would have been a killer argument for me. In this case I'll stick to Spek for the moment. Thanks for your timeLeoColman
01/19/2019, 11:14 PMrobstoll
01/19/2019, 11:22 PMLeoColman
01/19/2019, 11:23 PMLeoColman
01/19/2019, 11:23 PMrobstoll
01/19/2019, 11:24 PMLeoColman
01/19/2019, 11:26 PMThis class should pass these tests from another class
is not yet supportedLeoColman
01/19/2019, 11:27 PMrobstoll
01/19/2019, 11:28 PMch.tutteli.atrium.spec.integration.IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec
defines the spec as such and requires certain functions which the BuilderSpec and the ShortcutSpec providerobstoll
01/19/2019, 11:29 PMrobstoll
01/19/2019, 11:31 PMLeoColman
01/19/2019, 11:35 PMLeoColman
01/19/2019, 11:36 PMrobstoll
01/19/2019, 11:36 PMrobstoll
01/19/2019, 11:38 PMl
in "hello world" then all should come up with 3
as result. Do you see what I mean?LeoColman
01/19/2019, 11:38 PMrobstoll
01/19/2019, 11:40 PMLeoColman
01/19/2019, 11:42 PMLeoColman
01/19/2019, 11:42 PMinterface SumCalculator {
fun add(first: Int, second: Int): Int
}
interface SubtractionCalculator {
fun subtract(first: Int, second: Int): Int
}
class SumOnlyCalculator : SumCalculator {
override fun add(first: Int, second: Int): Int = first + second
}
class ComplexCalculator : SumCalculator, SubtractionCalculator {
override fun add(first: Int, second: Int): Int = first + second
override fun subtract(first: Int, second: Int): Int = first - second
}
LeoColman
01/19/2019, 11:42 PMLeoColman
01/19/2019, 11:43 PMComplexCalculator
and SumOnlyCalculator
, right?LeoColman
01/19/2019, 11:43 PMLeoColman
01/19/2019, 11:46 PMrobstoll
01/19/2019, 11:47 PMLeoColman
01/19/2019, 11:47 PMLeoColman
01/19/2019, 11:48 PMsum
test twiceLeoColman
01/19/2019, 11:48 PMsubtract
test twicerobstoll
01/19/2019, 11:55 PMLeoColman
01/19/2019, 11:56 PMLeoColman
01/19/2019, 11:56 PMLeoColman
01/19/2019, 11:56 PMfun AbstractStringSpec.testSumCalculations(sumCalculator: SumCalculator) {
"should sum correctly" {
sumCalculator.add(1, 2) shouldBe 3
}
}
fun AbstractStringSpec.testSubtractCalculations(subtractionCalculator: SubtractionCalculator) {
"should subtract correctly" {
subtractionCalculator.subtract(2, 1) shouldBe 1
}
}
class SumOnlyCalculatorTest : StringSpec({
testSumCalculations(SumOnlyCalculator())
})
class SubtractOnlyCalculatorTest : StringSpec({
testSubtractCalculations(SubtractionOnlyCalculator())
})
class ComplexCalculatorTest : StringSpec({
val target = ComplexCalculator()
testSumCalculations(target)
testSubtractCalculations(target)
})
LeoColman
01/19/2019, 11:57 PMLeoColman
01/19/2019, 11:57 PMLeoColman
01/19/2019, 11:58 PMLeoColman
01/19/2019, 11:59 PMLeoColman
01/20/2019, 12:09 AMrobstoll
01/20/2019, 12:18 AMLeoColman
01/20/2019, 12:25 AMLeoColman
01/20/2019, 12:25 AMrobstoll
01/20/2019, 12:28 AMrobstoll
01/20/2019, 12:29 AMLeoColman
01/20/2019, 1:00 AMLeoColman
01/20/2019, 1:01 AMLeoColman
01/20/2019, 1:04 AMrobstoll
01/20/2019, 9:01 AM