org.objectweb.jtests.jms.conform.selector
Class SelectorTest

java.lang.Object
  extended byTestCase
      extended byorg.objectweb.jtests.jms.framework.JMSTestCase (src) 
          extended byorg.objectweb.jtests.jms.framework.PTPTestCase (src) 
              extended byorg.objectweb.jtests.jms.conform.selector.SelectorTest

public class SelectorTest
extends PTPTestCase (src)

Test the message selector features of JMS

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jtests.jms.framework.PTPTestCase (src)
admin, ctx, receiver, receiverConnection, receiverQCF, receiverQueue, receiverSession, sender, senderConnection, senderQCF, senderQueue, senderSession
 
Constructor Summary
SelectorTest(java.lang.String name)
           
 
Method Summary
static Test suite()
          Method to use this class in a Test suite
 void testBetween()
          Test the BETWEEN condition
"age BETWEEN 15 and 19" is true for 17 and false for 20
 void testEquals()
          Test the "=" condition in message selector
"weight > 2500"
 void testGreaterThan()
          Test the ">" condition in message selector
"weight > 2500"
 void testIn()
          Test the IN condition
"Country IN ('UK', 'US', 'France')" is true for 'UK' and false for 'Peru'
 void testLike_1()
          Test the LIKE condition with '%' in the pattern
"phone LIKE '12%3'" is true for '12993' and false for '1234'
 void testLike_2()
          Test the LIKE condition with '_' in the pattern
"word LIKE 'l_se'" is true for 'lose' and false for 'loose'
 void testLikeEscape()
          Test the LIKE ...
 void testNull()
          Test the NULL value in message selector
"prop IS NULL"
 void testSelectorExampleFromSpecs()
          Test the message selector using the filter example provided by the JMS specifications
"JMSType = 'car' AND color = 'blue' AND weight > 2500"
 
Methods inherited from class org.objectweb.jtests.jms.framework.PTPTestCase (src)
setUp, tearDown
 
Methods inherited from class org.objectweb.jtests.jms.framework.JMSTestCase (src)
fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectorTest

public SelectorTest(java.lang.String name)
Method Detail

testSelectorExampleFromSpecs

public void testSelectorExampleFromSpecs()
Test the message selector using the filter example provided by the JMS specifications


testGreaterThan

public void testGreaterThan()
Test the ">" condition in message selector


testEquals

public void testEquals()
Test the "=" condition in message selector


testBetween

public void testBetween()
Test the BETWEEN condition
"age BETWEEN 15 and 19" is true for 17 and false for 20


testIn

public void testIn()
Test the IN condition
"Country IN ('UK', 'US', 'France')" is true for 'UK' and false for 'Peru'


testLikeEscape

public void testLikeEscape()
Test the LIKE ... ESCAPE condition
"underscored LIKE '\_%' ESCAPE '\'" is true for '_foo' and false for 'bar'


testLike_2

public void testLike_2()
Test the LIKE condition with '_' in the pattern
"word LIKE 'l_se'" is true for 'lose' and false for 'loose'


testLike_1

public void testLike_1()
Test the LIKE condition with '%' in the pattern
"phone LIKE '12%3'" is true for '12993' and false for '1234'


testNull

public void testNull()
Test the NULL value in message selector


suite

public static Test suite()
Method to use this class in a Test suite