package org.craftsrecords.talkadvisor.recommendation.stepdefs | |
import cucumber.api.java.en.Then | |
import cucumber.api.java.en.When | |
import org.craftsrecords.talkadvisor.recommendation.api.RecommendTalks | |
import org.craftsrecords.talkadvisor.recommendation.assertions.that | |
import org.craftsrecords.talkadvisor.recommendation.criteria.GuestCriteria | |
import org.craftsrecords.talkadvisor.recommendation.talk.TalkFormat | |
import java.time.Duration.ofMinutes | |
class RecommendationStepdefs(private val testContext: TestContext, | |
private val recommendTalks: RecommendTalks) { | |
@When("^he asks for a recommendation$") | |
fun `he asks for a recommendation`() { | |
try { | |
val user = testContext.userId | |
val recommendation = recommendTalks to user | |
testContext.recommendation = recommendation | |
} catch (e: Exception) { | |
testContext.error = e | |
} | |
} | |
@Then("^the recommended talks are related to (.+)") | |
fun `the recommended talks are related to`(topic: String) { | |
val recommendation = testContext.recommendation | |
recommendation.that `has talks related to` topic | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment