use of co.aurasphere.botmill.fb.model.incoming.MessageEnvelope in project fb-botmill by BotMill.
the class AnnotatedTemplateTest method testAnnotatedBot.
@Test
public void testAnnotatedBot() {
String json = "{\"sender\":{\"id\":\"1158621824216736\"},\"recipient\":{\"id\":\"1226565047419159\"},\"timestamp\":1490832021661,\"message\":{\"mid\":\"mid.$cAAUPCFn4ymdhTcignVbHH3rzpKd_\",\"seq\":844819,\"text\":\"Hi!\"}}";
MessageEnvelope envelope = FbBotMillJsonUtils.fromJson(json, MessageEnvelope.class);
IncomingToOutgoingMessageHandler.getInstance().process(envelope);
assertNotNull(envelope);
}
use of co.aurasphere.botmill.fb.model.incoming.MessageEnvelope in project fb-botmill by BotMill.
the class AnnotatedTemplateTest method testBuyButton.
@Test
public void testBuyButton() {
String json = "{\"sender\":{\"id\":\"1158621824216736\"},\"recipient\":{\"id\":\"1226565047419159\"},\"timestamp\":1490832021661,\"message\":{\"mid\":\"mid.$cAAUPCFn4ymdhTcignVbHH3rzpKd_\",\"seq\":844819,\"text\":\"buy button\"}}";
MessageEnvelope envelope = FbBotMillJsonUtils.fromJson(json, MessageEnvelope.class);
IncomingToOutgoingMessageHandler.getInstance().process(envelope);
assertNotNull(envelope);
}
use of co.aurasphere.botmill.fb.model.incoming.MessageEnvelope in project fb-botmill by BotMill.
the class AnnotatedTemplateTest method testAnnotatedListTemplateBot.
@Test
public void testAnnotatedListTemplateBot() {
String json = "{\"sender\":{\"id\":\"1158621824216736\"},\"recipient\":{\"id\":\"1226565047419159\"},\"timestamp\":1490832021661,\"message\":{\"mid\":\"mid.$cAAUPCFn4ymdhTcignVbHH3rzpKd_\",\"seq\":844819,\"text\":\"list template\"}}";
MessageEnvelope envelope = FbBotMillJsonUtils.fromJson(json, MessageEnvelope.class);
IncomingToOutgoingMessageHandler.getInstance().process(envelope);
assertNotNull(envelope);
}
Aggregations