You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Inspired by https://github.com/chbatey/kafka-unit
7
7
8
8
scalatest-embedded-kafka is available on Bintray and Maven Central, compiled for both Scala 2.10 and 2.11
9
9
10
-
* In your `build.sbt` file add the following dependency: `"org.scalatest" %% "scalatest" % "0.2.3"`
10
+
* In your `build.sbt` file add the following dependency: `"org.scalatest" %% "scalatest" % "0.3.0"`
11
11
* Have your `Spec` extend the `EmbeddedKafka` trait.
12
12
* Enclose the code that needs a running instance of Kafka within the `withRunningKafka` closure.
13
13
@@ -41,11 +41,14 @@ It's possible to change the ports on which Zookeeper and Kafka are started by pr
41
41
42
42
## Utility methods
43
43
44
-
The `EmbeddedKafka` trait provides also an utility method to publish a message to a topic:
44
+
The `EmbeddedKafka` trait provides also some utility methods to interact with the embedded kafka, in order to set preconditions or verifications in your specs:
45
45
46
-
publishToKafka("topic", "message")
46
+
def publishToKafka(topic: String, message: String): Unit
47
47
48
-
At the moment it's only possible to publish a message as a `String`. There's no utility method for consuming, but this will be part of a next release.
0 commit comments