Package com.codingchili.core.testing
Class MessageMock
java.lang.Object
com.codingchili.core.testing.MessageMock
- All Implemented Interfaces:
io.vertx.core.eventbus.Message<Object>
Mock class for messages.
-
Constructor Summary
ConstructorDescriptionMessageMock(io.vertx.core.json.JsonObject json)
Creates a new message mock. -
Method Summary
Modifier and TypeMethodDescriptionaddress()
body()
void
io.vertx.core.MultiMap
headers()
boolean
isSend()
void
void
<R> io.vertx.core.Future<io.vertx.core.eventbus.Message<R>>
replyAndRequest(Object message)
<R> io.vertx.core.Future<io.vertx.core.eventbus.Message<R>>
replyAndRequest(Object message, io.vertx.core.eventbus.DeliveryOptions options)
<R> void
replyAndRequest(Object message, io.vertx.core.eventbus.DeliveryOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.eventbus.Message<R>>> replyHandler)
<R> void
replyAndRequest(Object message, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.eventbus.Message<R>>> replyHandler)
setListener(ResponseListener listener)
-
Constructor Details
-
MessageMock
public MessageMock(io.vertx.core.json.JsonObject json)Creates a new message mock.- Parameters:
json
- the payload of the message.
-
-
Method Details
-
setListener
-
body
- Specified by:
body
in interfaceio.vertx.core.eventbus.Message<Object>
-
reply
- Specified by:
reply
in interfaceio.vertx.core.eventbus.Message<Object>
-
address
- Specified by:
address
in interfaceio.vertx.core.eventbus.Message<Object>
-
headers
public io.vertx.core.MultiMap headers()- Specified by:
headers
in interfaceio.vertx.core.eventbus.Message<Object>
-
replyAddress
- Specified by:
replyAddress
in interfaceio.vertx.core.eventbus.Message<Object>
-
isSend
public boolean isSend()- Specified by:
isSend
in interfaceio.vertx.core.eventbus.Message<Object>
-
reply
- Specified by:
reply
in interfaceio.vertx.core.eventbus.Message<Object>
-
fail
- Specified by:
fail
in interfaceio.vertx.core.eventbus.Message<Object>
-
replyAndRequest
public <R> void replyAndRequest(Object message, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.eventbus.Message<R>>> replyHandler)- Specified by:
replyAndRequest
in interfaceio.vertx.core.eventbus.Message<Object>
-
replyAndRequest
- Specified by:
replyAndRequest
in interfaceio.vertx.core.eventbus.Message<Object>
-
replyAndRequest
public <R> void replyAndRequest(Object message, io.vertx.core.eventbus.DeliveryOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.eventbus.Message<R>>> replyHandler)- Specified by:
replyAndRequest
in interfaceio.vertx.core.eventbus.Message<Object>
-
replyAndRequest
public <R> io.vertx.core.Future<io.vertx.core.eventbus.Message<R>> replyAndRequest(Object message, io.vertx.core.eventbus.DeliveryOptions options)- Specified by:
replyAndRequest
in interfaceio.vertx.core.eventbus.Message<Object>
-