use of com.symphony.api.model.V4Initiator in project spring-bot by finos.
the class BotIT method testSendMessageIMPrivateBot.
@Test
public void testSendMessageIMPrivateBot() {
V4Event in = new V4Event().initiator(new V4Initiator().user(new V4User().email("rob@example.com").displayName("Rob Example").userId(2438923l))).payload(new V4Payload().messageSent(new V4MessageSent().message(new V4Message().message("<div>hello</div>").data("{}").stream(new V4Stream().streamId("ABC123").streamType("IM")))));
getPrivateBot().sendToConsumer(in);
littleSleep();
wireMockRule.verify(1, WireMock.postRequestedFor(urlPathMatching("/kore2")));
wireMockRule.verify(1, WireMock.postRequestedFor(urlPathMatching("/agent/v4/stream/ABC123/message/create")));
}
use of com.symphony.api.model.V4Initiator in project spring-bot by finos.
the class BotIT method testSendMessageRoomWithSlash.
@Test
public void testSendMessageRoomWithSlash() {
V4Event in = new V4Event().initiator(new V4Initiator().user(new V4User().email("rob@example.com").displayName("Rob Example").userId(2438923l))).payload(new V4Payload().messageSent(new V4MessageSent().message(new V4Message().message("<div>/hello</div>").data("{}").stream(new V4Stream().streamId("ABC123").streamType("ROOM")))));
getPublicBot().sendToConsumer(in);
littleSleep();
wireMockRule.verify(1, WireMock.postRequestedFor(urlPathMatching("/kore")).withRequestBody(matching(".*\"message\":\\{\"text\":\"hello\"\\}.*")));
}
Aggregations