Permalink
Browse files

add empty events to the dsl

  • Loading branch information...
1 parent 12aa0f7 commit fff065d50748f866e8812fec7535d5ea8a5d7b0b @benmur committed Jan 1, 2013
@@ -17,6 +17,7 @@ trait EventDSL {
implicit def eventPartToEventPartCombinator(e: EventPart) = new EventPartCombinator(e)
+ def oneEvent() = EventPart()
def host(s: String) = EventPart(host = Some(s))
def service(s: String) = EventPart(service = Some(s))
def state(s: String) = EventPart(state = Some(s))
@@ -11,6 +11,12 @@ class EventDSLTest extends FunSuite {
}
}
+ test("provide an EventPart builder function for empty events") {
+ expect(EventPart()) {
+ oneEvent()
+ }
+ }
+
test("provide an EventPart builder function for service") {
expect(EventPart(service = Some("se"))) {
service("se")

0 comments on commit fff065d

Please sign in to comment.