@Test public void testOtherEventType() { event.type = Event.EVENT_TYPE_TYPING; setEventTextMessageBody("Bob"); Assert.assertFalse(condition.isSatisfied(event, displayName)); }
public boolean isSatisfied(Event event, String myDisplayName) { if (Event.EVENT_TYPE_MESSAGE.equals(event.getType())) { Message msg = JsonUtils.toMessage(event.getContent()); if (null != msg) { return EventUtils.caseInsensitiveFind(myDisplayName, msg.body); } } return false; }
ContainsDisplayNameCondition extends Condition { public boolean isSatisfied(Event event, String myDisplayName) { if (Event.EVENT_TYPE_MESSAGE.equals(event.getType())) { Message msg = JsonUtils.toMessage(event.getContent()); if (null != msg) { return EventUtils.caseInsensitiveFind(myDisplayName, msg.body); } } return false; } }
ContainsDisplayNameCondition extends Condition { public boolean isSatisfied(Event event, String myDisplayName) { if (Event.EVENT_TYPE_MESSAGE.equals(event.getType())) { Message msg = JsonUtils.toMessage(event.getContent()); if (null != msg) { return EventUtils.caseInsensitiveFind(myDisplayName, msg.body); } } return false; } ContainsDisplayNameCondition(); }
ContainsDisplayNameCondition extends Condition { public boolean isSatisfied(Event event, String myDisplayName) { if (Event.EVENT_TYPE_MESSAGE.equals(event.getType())) { Message msg = JsonUtils.toMessage(event.getContent()); if (null != msg) { return EventUtils.caseInsensitiveFind(myDisplayName, msg.body); } } return false; } ContainsDisplayNameCondition(); boolean isSatisfied(Event event, String myDisplayName); }
ContainsDisplayNameCondition extends Condition { public boolean isSatisfied(Event event, String myDisplayName) { if (Event.EVENT_TYPE_MESSAGE.equals(event.getType())) { Message msg = JsonUtils.toMessage(event.getContent()); if (null != msg) { return EventUtils.caseInsensitiveFind(myDisplayName, msg.body); } } return false; } ContainsDisplayNameCondition(); boolean isSatisfied(Event event, String myDisplayName);  }