Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.objectweb.jtests.jms.conform.selector
Class SelectorTest  view SelectorTest download SelectorTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.objectweb.jtests.jms.framework.JMSTestCase
              extended byorg.objectweb.jtests.jms.framework.PTPTestCase
                  extended byorg.objectweb.jtests.jms.conform.selector.SelectorTest
All Implemented Interfaces:
junit.framework.Test

public class SelectorTest
extends org.objectweb.jtests.jms.framework.PTPTestCase

Test the message selector features of JMS

Version:
$Id: SelectorTest.java,v 1.1 2002/04/21 21:15:19 chirino Exp $

Field Summary
 
Fields inherited from class org.objectweb.jtests.jms.framework.PTPTestCase
admin, ctx, receiver, receiverConnection, receiverQCF, receiverQueue, receiverSession, sender, senderConnection, senderQCF, senderQueue, senderSession
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
SelectorTest(java.lang.String name)
           
 
Method Summary
static junit.framework.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
setUp, tearDown
 
Methods inherited from class org.objectweb.jtests.jms.framework.JMSTestCase
fail
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
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, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
  • "JMSType = 'car' AND color = 'blue' AND weight > 2500"


testGreaterThan

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


testEquals

public void testEquals()
Test the "=" condition in message selector
  • "weight > 2500"


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
  • "prop IS NULL"


suite

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