Skip to content

Instantly share code, notes, and snippets.

@dacr dacr/
Last active Oct 12, 2019

What would you like to do?
Drools Hello world #da1c86ab-08d9-4b33-806a-85326acbc9b6/dd181424e32a38118ea7f67403c6d95dba4ad45a
// summary : Drools Hello world
// keywords : scala, drools, mvel, scalatest, ai, @testable
// publish : gist, snippet
// authors : David Crosson
// id : da1c86ab-08d9-4b33-806a-85326acbc9b6
// execution : scala ammonite script ( - run as follow 'amm'
import $ivy.`fr.janalyse::drools-scripting:1.0.6`, $ivy.`org.scalatest::scalatest:3.0.8`
import fr.janalyse.droolscripting._, org.scalatest._, org.scalatest.OptionValues._
object HelloTest extends FlatSpec with Matchers {
"Drools" should "say hello" in {
val drl =
"""package test
|rule "hello" when
| insert("HELLO WORLD");
val engine = DroolsEngine(drl)
engine.strings shouldBe List("HELLO WORLD")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.