diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dd70188..468fbe32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,12 @@ See also the [CHANGELOG](https://github.com/cucumber/cucumber-jvm/blob/master/CH ### Added +- [Scala] `ScalaSnippet` now implements `language()` method from `io.cucumber.core.backend.Snippet` + ### Changed +- [Core] Update `cucumber-core` dependency to [7.29.0](https://github.com/cucumber/cucumber-jvm/blob/main/CHANGELOG.md) + ### Deprecated ### Removed diff --git a/cucumber-scala/src/main/scala/io/cucumber/scala/ScalaSnippet.scala b/cucumber-scala/src/main/scala/io/cucumber/scala/ScalaSnippet.scala index 0a6b119a..7f0733b0 100644 --- a/cucumber-scala/src/main/scala/io/cucumber/scala/ScalaSnippet.scala +++ b/cucumber-scala/src/main/scala/io/cucumber/scala/ScalaSnippet.scala @@ -3,6 +3,7 @@ package io.cucumber.scala import java.lang.reflect.Type import java.text.MessageFormat import java.util.{Map => JMap} +import java.util.Optional import io.cucumber.core.backend.Snippet import io.cucumber.datatable.DataTable @@ -20,6 +21,10 @@ class ScalaSnippet extends Snippet { import ScalaSnippet.tripleDoubleQuotes + override def language(): Optional[String] = { + Optional.of("scala") + } + override def template(): MessageFormat = { new MessageFormat( s"""{0}(${tripleDoubleQuotes}{1}${tripleDoubleQuotes}) '{' ({3}) =>