Skip to content

Instantly share code, notes, and snippets.

Created August 12, 2020 18:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
package org.craftsrecords.talkadvisor.recommendation.stepdefs
import org.craftsrecords.talkadvisor.recommendation.api.RecommendTalks
import org.craftsrecords.talkadvisor.recommendation.assertions.that
import org.craftsrecords.talkadvisor.recommendation.criteria.GuestCriteria
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