use of org.finos.symphony.toolkit.workflow.java.mapping.MessageMatcher in project spring-bot by finos.
the class TestMessageMLParser method testMessageMatcherMore.
@Test
public void testMessageMatcherMore() throws Exception {
Content pattern = smp.parse("hello some words");
Content c2 = smp.parse("hello some words and some more words");
MessageMatcher m1 = new MessageMatcher(pattern);
Assertions.assertTrue(m1.consume(c2, new HashMap<ChatVariable, Object>()));
Content c3 = smp.parse("hello some different words");
Assertions.assertFalse(m1.consume(c3, new HashMap<ChatVariable, Object>()));
}
use of org.finos.symphony.toolkit.workflow.java.mapping.MessageMatcher in project spring-bot by finos.
the class TestMessageMLParser method testMessageMatcherExact.
@Test
public void testMessageMatcherExact() throws Exception {
Content c = smp.parse("hello some words");
MessageMatcher m1 = new MessageMatcher(c);
Assertions.assertTrue(m1.consume(c, new HashMap<ChatVariable, Object>()));
}
Aggregations