Scala
Wikipedia describes Scala like this:[98]
Scala is an object-functional programming language for general software applications. Scala has full support for functional programming and a very strong static type system. This allows programs written in Scala to be very concise and thus smaller in size than most general purpose programming languages. Many of Scala’s design decisions were inspired by criticism over the shortcomings of Java.
The cucumber-scala back end has neither integrations with DI containers (like cucumber-java) nor a World hook like Groovy. You have to roll your own context-sharing mechanism and ensure that it gets reset before each scenario. This example shows one way to do it:
| appendix/scala/01/src/test/scala/checkout/CheckoutWorld.scala ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access