Class SelectorTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.objectweb.jtests.jms.framework.JMSTestCase
org.objectweb.jtests.jms.framework.PTPTestCase
org.objectweb.jtests.jms.conform.selector.SelectorTest
- All Implemented Interfaces:
junit.framework.Test
Test the message selector features of JMS
- Version:
- $Id: SelectorTest.java,v 1.3 2007/10/02 14:59:35 csuconic Exp $
- Author:
- Jeff Mesnil (jmesnil@)
-
Field Summary
Fields inherited from class org.objectweb.jtests.jms.framework.PTPTestCase
ctx, receiver, receiverConnection, receiverQCF, receiverQueue, receiverSession, sender, senderConnection, senderQCF, senderQueue, senderSessionFields inherited from class org.objectweb.jtests.jms.framework.JMSTestCase
admin, PROP_FILE_NAME, startServer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic junit.framework.Testsuite()Method to use this class in a Test suitevoidTest the BETWEEN condition in message selector.voidTest that an empty string as a message selector indicates that there is no message selector for the message consumer.voidTest the "=" condition in message selector.voidTest the ">" condition in message selector.voidTest that conversions that apply to thegetmethods for properties do not apply when a property is used in a message selector expression.voidtestIn()Test the IN condition in message selector.voidTest that the JMS propertyJMSDeliveryModeis treated as having the values'PERSISTENT'or'NON_PERSISTENT'when used in a message selector (chapter 3.8.1.3).voidTest the LIKE condition with '%' in the pattern.voidTest the LIKE condition with '_' in the pattern.voidTest the LIKE ...voidTest the "<>" (not equal) condition in message selector.voidtestNull()Test theNULLvalue in message selector.voidTest the message selector using the filter example provided by the JMS specifications.voidTats that String literals are well handled by the message selector.Methods inherited from class org.objectweb.jtests.jms.framework.PTPTestCase
setUp, tearDownMethods inherited from class org.objectweb.jtests.jms.framework.JMSTestCase
fail, getProviderPropertiesMethods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
-
Constructor Details
-
SelectorTest
-
-
Method Details
-
testEmptyStringAsSelector
Test that an empty string as a message selector indicates that there is no message selector for the message consumer.- Throws:
Exception
-
testStringLiterals
Tats that String literals are well handled by the message selector.
"string = 'literal''s;"istruefor "literal's" andfalsefor "literal"
- Throws:
Exception
-
testJMSDeliveryModeInSelector
Test that the JMS propertyJMSDeliveryModeis treated as having the values'PERSISTENT'or'NON_PERSISTENT'when used in a message selector (chapter 3.8.1.3).- Throws:
Exception
-
testIdentifierConversion
Test that conversions that apply to thegetmethods for properties do not apply when a property is used in a message selector expression. Based on the example of chapter 3.8.1.1 about identifiers.- Throws:
Exception
-
testSelectorExampleFromSpecs
Test the message selector using the filter example provided by the JMS specifications.
"JMSType = 'car' AND color = 'blue' AND weight > 2500"
- Throws:
Exception
-
testGreaterThan
Test the ">" condition in message selector.
"weight > 2500"istruefor 3000 andfalsefor 1000
- Throws:
Exception
-
testEquals
Test the "=" condition in message selector.
"weight = 2500"istruefor 2500 andfalsefor 1000
- Throws:
Exception
-
testNotEquals
Test the "<>" (not equal) condition in message selector.
"weight <> 2500"istruefor 1000 andfalsefor 2500
- Throws:
Exception
-
testBetween
Test the BETWEEN condition in message selector.
- "age BETWEEN 15 and 19" is
truefor 17 andfalsefor 20
- Throws:
Exception
- "age BETWEEN 15 and 19" is
-
testIn
Test the IN condition in message selector.
- "Country IN ('UK', 'US', 'France')" is
truefor 'UK' andfalsefor 'Peru'
- Throws:
Exception
- "Country IN ('UK', 'US', 'France')" is
-
testLikeEscape
Test the LIKE ... ESCAPE condition in message selector
- "underscored LIKE '\_%' ESCAPE '\'" is
truefor '_foo' andfalsefor 'bar'
- Throws:
Exception
- "underscored LIKE '\_%' ESCAPE '\'" is
-
testLike_2
Test the LIKE condition with '_' in the pattern.
- "word LIKE 'l_se'" is
truefor 'lose' andfalsefor 'loose'
- Throws:
Exception
- "word LIKE 'l_se'" is
-
testLike_1
Test the LIKE condition with '%' in the pattern.
- "phone LIKE '12%3'" is
truefor '12993' andfalsefor '1234'
- Throws:
Exception
- "phone LIKE '12%3'" is
-
testNull
Test theNULLvalue in message selector.
"prop IS NULL"
- Throws:
Exception
-
suite
public static junit.framework.Test suite()Method to use this class in a Test suite
-