org.exolab.jmscts.test.selector
Class BetweenOperatorTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.exolab.jmscts.core.JMSTestCase
                    |
                    +--org.exolab.jmscts.core.AbstractConnectionFactoryTestCase
                          |
                          +--org.exolab.jmscts.core.AbstractConnectionTestCase
                                |
                                +--org.exolab.jmscts.core.AbstractSessionTestCase
                                      |
                                      +--org.exolab.jmscts.core.AbstractMessageTestCase
                                            |
                                            +--org.exolab.jmscts.core.AbstractSendReceiveTestCase
                                                  |
                                                  +--org.exolab.jmscts.test.selector.AbstractSelectorTestCase
                                                        |
                                                        +--org.exolab.jmscts.test.selector.BetweenOperatorTest
All Implemented Interfaces:
ConnectionFactoryTestCase, ConnectionTestCase, JMSTest, MessageTestCase, SendReceiveTestCase, SessionTestCase, junit.framework.Test

public class BetweenOperatorTest
extends AbstractSelectorTestCase

This class tests selector containing the BETWEEN operator.

Version:
$Revision: 1.5 $
Author:
Tim Anderson
See Also:
AbstractSelectorTestCase

Constructor Summary
BetweenOperatorTest(java.lang.String name)
          Create an instance of this class for a specific test case
 
Method Summary
static junit.framework.Test suite()
          Sets up the test suite
 void testBetween1()
          Verifies that the selector 17 between 16 and 18 selects all messages
 void testBetween2()
          Verifies that the selector 17 between 18 and 19 selects no messages
 void testBetween3()
          Verifies that the selector 17 Between 17 And 17 selects all messages
 void testBetween4()
          Verifies that the selector 17 between 4 * 4 and 10 + 8 selects all messages
 void testBetween5()
          Verifies that the selector 17 between 4 * 5 and 10 + 12 selects no messages
 void testBetween6()
          Verifies that the selector two between one and three selects all messages, where one, two and three are integer properties with with corresponding values
 void testInvalid1()
          Verifies that the selector two between '1' and '3' throws InvalidSelectorException
 void testInvalid2()
          Verifies that the selector one between false and true throws InvalidSelectorException
 void testInvalid3()
          Verifies that the selector b' between 'a' and 'c' throws InvalidSelectorException
 void testInvalid4()
          Verifies that the selector between 1 and 3 throws InvalidSelectorException
 void testInvalid5()
          Verifies that the selector not between 1 and 3 throws InvalidSelectorException
 void testInvalid6()
          Verifies that the selector 2 between 1, 3 throws InvalidSelectorException
 void testInvalid7()
          Verifies that the selector 2 between 1 and throws InvalidSelectorException
 void testInvalid8()
          Verifies that the selector 2 between and 3 throws InvalidSelectorException
 void testInvalid9()
          Verifies that the selector JMSMessageID between 1 and 10 throws InvalidSelectorException
 void testNotBetween1()
          Verifies that the selector 17 not between 18 and 19 selects all messages
 void testNotBetween2()
          Verifies that the selector 17 not between 16 and 18 selects no messages
 void testNotBetween3()
          Verifies that the selector 17 not between 17 and 17 selects no messages
 void testNotBetween4()
          Verifies that the selector 17 Not Between 4 * 5 And 20 / 1 selects all messages
 void testNotBetween5()
          Verifies that the selector two not between one and three selects all messages, where one, two and three are integer properties with with corresponding values
 void testUnsetProperty1()
          Verifies that the selector dummy between 1 and 10 selects no messages, for the unset property 'dummy'
 void testUnsetProperty2()
          Verifies that the selector 1 between dummy and 10 selects no messages, for the unset property 'dummy'
 void testUnsetProperty3()
          Verifies that the selector 1 between 0 and dummy selects no messages, for the unset property 'dummy'
 
Methods inherited from class org.exolab.jmscts.test.selector.AbstractSelectorTestCase
checkInvalidSelector, checkSelector, checkSelector, getDestinations, getMessagePopulator
 
Methods inherited from class org.exolab.jmscts.core.AbstractSendReceiveTestCase
close, close, close, close, createReceiver, createReceiver, createReceivers, createReceivers, createSender, createSender, createSenders, createSenders, getDeliveryTypes, getDestination, getDurableOnly, receive, receive, receive, receive, receive, receive, recreate, send, send, send, send, send, send, send, send, sendReceive, sendReceive, setDestinations
 
Methods inherited from class org.exolab.jmscts.core.AbstractMessageTestCase
getMessageTypes, shouldCreateMessage, startConnection
 
Methods inherited from class org.exolab.jmscts.core.AbstractSessionTestCase
getAckTypes
 
Methods inherited from class org.exolab.jmscts.core.AbstractConnectionTestCase
setClientID
 
Methods inherited from class org.exolab.jmscts.core.AbstractConnectionFactoryTestCase
getConnectionFactoryTypes
 
Methods inherited from class org.exolab.jmscts.core.JMSTestCase
getContext, getRequirements, setContext, share
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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
 
Methods inherited from interface org.exolab.jmscts.core.MessageTestCase
getMessageTypes, shouldCreateMessage, startConnection
 
Methods inherited from interface org.exolab.jmscts.core.SessionTestCase
getAckTypes
 
Methods inherited from interface org.exolab.jmscts.core.ConnectionTestCase
setClientID
 
Methods inherited from interface org.exolab.jmscts.core.ConnectionFactoryTestCase
getConnectionFactoryTypes
 
Methods inherited from interface org.exolab.jmscts.core.JMSTest
getContext, setContext, share
 
Methods inherited from interface junit.framework.Test
countTestCases, run
 

Constructor Detail

BetweenOperatorTest

public BetweenOperatorTest(java.lang.String name)
Create an instance of this class for a specific test case
Parameters:
name - the name of test case
Method Detail

suite

public static junit.framework.Test suite()
Sets up the test suite
Returns:
an instance of this class that may be run by JMSTestRunner

testBetween1

public void testBetween1()
                  throws java.lang.Exception
Verifies that the selector 17 between 16 and 18 selects all messages
Throws:
java.lang.Exception - for any error

testBetween2

public void testBetween2()
                  throws java.lang.Exception
Verifies that the selector 17 between 18 and 19 selects no messages
Throws:
java.lang.Exception - for any error

testBetween3

public void testBetween3()
                  throws java.lang.Exception
Verifies that the selector 17 Between 17 And 17 selects all messages
Throws:
java.lang.Exception - for any error

testBetween4

public void testBetween4()
                  throws java.lang.Exception
Verifies that the selector 17 between 4 * 4 and 10 + 8 selects all messages
Throws:
java.lang.Exception - for any error

testBetween5

public void testBetween5()
                  throws java.lang.Exception
Verifies that the selector 17 between 4 * 5 and 10 + 12 selects no messages
Throws:
java.lang.Exception - for any error

testBetween6

public void testBetween6()
                  throws java.lang.Exception
Verifies that the selector two between one and three selects all messages, where one, two and three are integer properties with with corresponding values
Throws:
java.lang.Exception - for any error

testNotBetween1

public void testNotBetween1()
                     throws java.lang.Exception
Verifies that the selector 17 not between 18 and 19 selects all messages
Throws:
java.lang.Exception - for any error

testNotBetween2

public void testNotBetween2()
                     throws java.lang.Exception
Verifies that the selector 17 not between 16 and 18 selects no messages
Throws:
java.lang.Exception - for any error

testNotBetween3

public void testNotBetween3()
                     throws java.lang.Exception
Verifies that the selector 17 not between 17 and 17 selects no messages
Throws:
java.lang.Exception - for any error

testNotBetween4

public void testNotBetween4()
                     throws java.lang.Exception
Verifies that the selector 17 Not Between 4 * 5 And 20 / 1 selects all messages
Throws:
java.lang.Exception - for any error

testNotBetween5

public void testNotBetween5()
                     throws java.lang.Exception
Verifies that the selector two not between one and three selects all messages, where one, two and three are integer properties with with corresponding values
Throws:
java.lang.Exception - for any error

testUnsetProperty1

public void testUnsetProperty1()
                        throws java.lang.Exception
Verifies that the selector dummy between 1 and 10 selects no messages, for the unset property 'dummy'
Throws:
java.lang.Exception - for any error

testUnsetProperty2

public void testUnsetProperty2()
                        throws java.lang.Exception
Verifies that the selector 1 between dummy and 10 selects no messages, for the unset property 'dummy'
Throws:
java.lang.Exception - for any error

testUnsetProperty3

public void testUnsetProperty3()
                        throws java.lang.Exception
Verifies that the selector 1 between 0 and dummy selects no messages, for the unset property 'dummy'
Throws:
java.lang.Exception - for any error

testInvalid1

public void testInvalid1()
                  throws java.lang.Exception
Verifies that the selector two between '1' and '3' throws InvalidSelectorException
Throws:
java.lang.Exception - for any error

testInvalid2

public void testInvalid2()
                  throws java.lang.Exception
Verifies that the selector one between false and true throws InvalidSelectorException
Throws:
java.lang.Exception - for any error

testInvalid3

public void testInvalid3()
                  throws java.lang.Exception
Verifies that the selector b' between 'a' and 'c' throws InvalidSelectorException
Throws:
java.lang.Exception - for any error

testInvalid4

public void testInvalid4()
                  throws java.lang.Exception
Verifies that the selector between 1 and 3 throws InvalidSelectorException
Throws:
java.lang.Exception - for any error

testInvalid5

public void testInvalid5()
                  throws java.lang.Exception
Verifies that the selector not between 1 and 3 throws InvalidSelectorException
Throws:
java.lang.Exception - for any error

testInvalid6

public void testInvalid6()
                  throws java.lang.Exception
Verifies that the selector 2 between 1, 3 throws InvalidSelectorException
Throws:
java.lang.Exception - for any error

testInvalid7

public void testInvalid7()
                  throws java.lang.Exception
Verifies that the selector 2 between 1 and throws InvalidSelectorException
Throws:
java.lang.Exception - for any error

testInvalid8

public void testInvalid8()
                  throws java.lang.Exception
Verifies that the selector 2 between and 3 throws InvalidSelectorException
Throws:
java.lang.Exception - for any error

testInvalid9

public void testInvalid9()
                  throws java.lang.Exception
Verifies that the selector JMSMessageID between 1 and 10 throws InvalidSelectorException
Throws:
java.lang.Exception - for any error


Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.