assertFalse("Selector did match when not expected", simpleSelectorFilter.matches(message));
}
public void testFailedMatchingFilter() throws Exception
{
MessageFilter simpleSelectorFilter = new JMSSelectorFilter("select>4");
assertNotNull("Filter object is null", simpleSelectorFilter);
assertNotNull("Selector string is null", simpleSelectorFilter.getSelector());
assertEquals("Unexpected selector", "select>4", simpleSelectorFilter.getSelector());
assertTrue("Filter object is invalid", simpleSelectorFilter != null);
final JMSTextMessage message = TestMessageHelper.newJMSTextMessage();
message.setStringProperty("select", "5");
assertFalse("Selector matched when not expected", simpleSelectorFilter.matches(message));
message.setStringProperty("select", "elephant");
assertFalse("Selector matched when not expected", simpleSelectorFilter.matches(message));
message.setBooleanProperty("select", false);
assertFalse("Selector matched when not expected", simpleSelectorFilter.matches(message));
}