(
class SampleServiceForStringSpecTest : StringSpec() {
init {
val service = SampleService()
"executeparam 1one " {
service.execute(1) shouldBe "one"
}
•
• shouldBe
KotlinTest
Slide 15
Slide 15 text
• FB
• ) F
FB
• ( S
Slide 16
Slide 16 text
Slide 17
Slide 17 text
(
class SampleServiceForBehaviorSpecTest : BehaviorSpec() {
init {
val service = SampleService()
given("execute") {
`when`("param1 ") {
val result = service.execute(1)
then("one
") {
result.shouldBe("one")
}
Slide 18
Slide 18 text
• D
• (
e B
• 3
K )( `
Slide 19
Slide 19 text
) ((
Slide 20
Slide 20 text
Slide 21
Slide 21 text
(
class SampleServiceForAnnotationSpecTest : AnnotationSpec() {
val service = SampleService()
@Test
fun param1one() {
service.execute(1) shouldBe "one"
}