|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.FloatTest
This class tests selectors containing floating point literals and objects.
AbstractSelectorTestCase
Constructor Summary | |
FloatTest(java.lang.String name)
Create an instance of this class for a specific test case, testing against all delivery types |
Method Summary | |
static junit.framework.Test |
suite()
Sets up the test suite |
void |
testDivisionByZero()
Verifies that the selector 10 / zero = 10 / zero selects
all messages, when the double property 'zero' is set, with
value 0.0 |
void |
testDoubleNaN1()
Verifies that the selector doubleNaN = doubleNaN
selects no messages, when the double property 'doubleNaN' is set,
with value Double.NaN (as NaN != NaN) |
void |
testDoubleNaN2()
Verifies that the selector doubleNaN <> doubleNaN
selects all messages, when the double property 'doubleNaN' is set,
with value Double.NaN |
void |
testEquals1()
Verifies that the selector 0.0 = 0.0 selects all
messages |
void |
testEquals2()
Verifies that the selector 0.0 = 1.0 selects no
messages |
void |
testEquals3()
Verifies that the selector 0.2 = 0.2 selects all
messages |
void |
testEquals4()
Verifies that the selector 0.2 = 0.0 selects no
messages |
void |
testEquals5()
Verifies that the selector 92d = 92 selects all messages |
void |
testEquals6()
Verifies that the selector 93f = 93 selects all messages |
void |
testEqualsProperty()
Verifies that the selector rate = 0.2 selects
all messages, when the double property 'rate' is set, with
value 0.2 |
void |
testFloatNaN1()
Verifies that the selector floatNaN = floatNaN selects
no messages, when the float property 'floatNaN' is set, with
value Float.NaN (as NaN != NaN) |
void |
testFloatNaN2()
Verifies that the selector floatNaN <> floatNaN
selects all messages, when the float property 'floatNaN' is set, with
value Float.NaN |
void |
testGreaterEquals1()
Verifies that the selector 2.0 >= 1.0 selects all
messages |
void |
testGreaterEquals2()
Verifies that the selector 1.0 >= 2.0 selects no
messages |
void |
testGreaterThan1()
Verifies that the selector 2.0 > 1.0 selects all
messages |
void |
testGreaterThan2()
Verifies that the selector 1.0 > 2.0 selects no
messages |
void |
testInvalid1()
Verifies that the selector 1.0 throws
InvalidSelectorException |
void |
testInvalid2()
Verifies that the selector -1.0 throws
InvalidSelectorException |
void |
testInvalid3()
Verifies that the selector 2.0 < '3.0' throws
InvalidSelectorException |
void |
testInvalid4()
Verifies that the selector 1.0 <> false throws
InvalidSelectorException |
void |
testInvalid5()
Verifies that the selector 1a.0 = 1a.0 throws
InvalidSelectorException |
void |
testLessEquals1()
Verifies that the selector 1.0 <= 2.0 selects all
messages |
void |
testLessEquals2()
Verifies that the selector 2.0 <= 1.0 selects no
messages |
void |
testLessThan1()
Verifies that the selector 1.0 < 2.0 selects all
messages |
void |
testLessThan2()
Verifies that the selector 2.0 < 1.0 selects no
messages |
void |
testNotEquals1()
Verifies that the selector 1.0 <> 2.0 selects all
messages |
void |
testNotEquals2()
Verifies that the selector 1.0 <> 1.0 selects no
messages |
void |
testNotEquals3()
Verifies that the selector 1.0 <> 1.0 selects all
messages |
void |
testNotEqualsProperty()
Verifies that the selector rate <> 0.2 selects
no messages, when the double property 'rate' is set, with
value 0.2 |
void |
testNumericRange()
Verifies that selectors can have approximate numeric literals in the range Double.MIN_VALUE..Double.MAX_VALUE ,
using the selector
{min-value}={min-value} and {max-value} = {max-value}
where {min-value} and {max-value} are the values of Double.MIN_VALUE and
Double.MAX_VALUE respectively. |
void |
testUnaryMinus1()
Verifies that the selector -1.0 = -1.0 selects all messages |
void |
testUnaryMinus2()
Verifies that the selector -1.0 = 1.0 selects no messages |
void |
testUnaryMinus3()
Verifies that the selector --1.0 = 1.0 selects all messages |
void |
testUnsetProperty1()
Verifies that the selector dummy + 10.0 = 10.0 selects
no messages, for the unset property 'dummy' |
void |
testUnsetProperty2()
Verifies that the selector dummy - 10.0 = -10.0 selects
no messages, for the unset property 'dummy' |
void |
testUnsetProperty3()
Verifies that the selector 10.0 + dummy = 10.0 selects
no messages, for the unset property 'dummy' |
void |
testUnsetProperty4()
Verifies that the selector 10.0 - dummy = 0.0 selects
no messages, for the unset property 'dummy' |
void |
testUnsetProperty5()
Verifies that the selector dummy * 10.0 = 0.0 selects
no messages, for the unset property 'dummy' |
void |
testUnsetProperty6()
Verifies that the selector 10.0 * dummy = 0.0 selects
no messages, for the unset property 'dummy' |
void |
testUnsetProperty7()
Verifies that the selector dummy / 10.0 = 0.0 selects
no messages, for the unset property 'dummy' |
void |
testUnsetProperty8()
Verifies that the selector 10.0 / dummy = 0.0 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 |
public FloatTest(java.lang.String name)
name
- the name of test caseMethod Detail |
public static junit.framework.Test suite()
JMSTestRunner
public void testEquals1() throws java.lang.Exception
0.0 = 0.0
selects all
messagesjava.lang.Exception
- for any errorpublic void testEquals2() throws java.lang.Exception
0.0 = 1.0
selects no
messagesjava.lang.Exception
- for any errorpublic void testEquals3() throws java.lang.Exception
0.2 = 0.2
selects all
messagesjava.lang.Exception
- for any errorpublic void testEquals4() throws java.lang.Exception
0.2 = 0.0
selects no
messagesjava.lang.Exception
- for any errorpublic void testEquals5() throws java.lang.Exception
92d = 92
selects all messagesjava.lang.Exception
- for any errorpublic void testEquals6() throws java.lang.Exception
93f = 93
selects all messagesjava.lang.Exception
- for any errorpublic void testNotEquals1() throws java.lang.Exception
1.0 <> 2.0
selects all
messagesjava.lang.Exception
- for any errorpublic void testNotEquals2() throws java.lang.Exception
1.0 <> 1.0
selects no
messagesjava.lang.Exception
- for any errorpublic void testNotEquals3() throws java.lang.Exception
1.0 <> 1.0
selects all
messagesjava.lang.Exception
- for any errorpublic void testLessThan1() throws java.lang.Exception
1.0 < 2.0
selects all
messagesjava.lang.Exception
- for any errorpublic void testLessThan2() throws java.lang.Exception
2.0 < 1.0
selects no
messagesjava.lang.Exception
- for any errorpublic void testGreaterThan1() throws java.lang.Exception
2.0 > 1.0
selects all
messagesjava.lang.Exception
- for any errorpublic void testGreaterThan2() throws java.lang.Exception
1.0 > 2.0
selects no
messagesjava.lang.Exception
- for any errorpublic void testLessEquals1() throws java.lang.Exception
1.0 <= 2.0
selects all
messagesjava.lang.Exception
- for any errorpublic void testLessEquals2() throws java.lang.Exception
2.0 <= 1.0
selects no
messagesjava.lang.Exception
- for any errorpublic void testGreaterEquals1() throws java.lang.Exception
2.0 >= 1.0
selects all
messagesjava.lang.Exception
- for any errorpublic void testGreaterEquals2() throws java.lang.Exception
1.0 >= 2.0
selects no
messagesjava.lang.Exception
- for any errorpublic void testUnaryMinus1() throws java.lang.Exception
-1.0 = -1.0
selects all messagesjava.lang.Exception
- for any errorpublic void testUnaryMinus2() throws java.lang.Exception
-1.0 = 1.0
selects no messagesjava.lang.Exception
- for any errorpublic void testUnaryMinus3() throws java.lang.Exception
--1.0 = 1.0
selects all messagesjava.lang.Exception
- for any errorpublic void testEqualsProperty() throws java.lang.Exception
rate = 0.2
selects
all messages, when the double property 'rate' is set, with
value 0.2
java.lang.Exception
- for any errorpublic void testNotEqualsProperty() throws java.lang.Exception
rate <> 0.2
selects
no messages, when the double property 'rate' is set, with
value 0.2
java.lang.Exception
- for any errorpublic void testUnsetProperty1() throws java.lang.Exception
dummy + 10.0 = 10.0
selects
no messages, for the unset property 'dummy'java.lang.Exception
- for any errorpublic void testUnsetProperty2() throws java.lang.Exception
dummy - 10.0 = -10.0
selects
no messages, for the unset property 'dummy'java.lang.Exception
- for any errorpublic void testUnsetProperty3() throws java.lang.Exception
10.0 + dummy = 10.0
selects
no messages, for the unset property 'dummy'java.lang.Exception
- for any errorpublic void testUnsetProperty4() throws java.lang.Exception
10.0 - dummy = 0.0
selects
no messages, for the unset property 'dummy'java.lang.Exception
- for any errorpublic void testUnsetProperty5() throws java.lang.Exception
dummy * 10.0 = 0.0
selects
no messages, for the unset property 'dummy'java.lang.Exception
- for any errorpublic void testUnsetProperty6() throws java.lang.Exception
10.0 * dummy = 0.0
selects
no messages, for the unset property 'dummy'java.lang.Exception
- for any errorpublic void testUnsetProperty7() throws java.lang.Exception
dummy / 10.0 = 0.0
selects
no messages, for the unset property 'dummy'java.lang.Exception
- for any errorpublic void testUnsetProperty8() throws java.lang.Exception
10.0 / dummy = 0.0
selects
no messages, for the unset property 'dummy'java.lang.Exception
- for any errorpublic void testNumericRange() throws java.lang.Exception
Double.MIN_VALUE..Double.MAX_VALUE
,
using the selector
{min-value}={min-value} and {max-value} = {max-value}
where {min-value} and {max-value} are the values of Double.MIN_VALUE and
Double.MAX_VALUE respectively. This should select all messages.java.lang.Exception
- for any errorpublic void testDivisionByZero() throws java.lang.Exception
10 / zero = 10 / zero
selects
all messages, when the double property 'zero' is set, with
value 0.0
java.lang.Exception
- for any errorpublic void testFloatNaN1() throws java.lang.Exception
floatNaN = floatNaN
selects
no messages, when the float property 'floatNaN' is set, with
value Float.NaN
(as NaN != NaN)java.lang.Exception
- for any errorpublic void testFloatNaN2() throws java.lang.Exception
floatNaN <> floatNaN
selects all messages, when the float property 'floatNaN' is set, with
value Float.NaN
java.lang.Exception
- for any errorpublic void testDoubleNaN1() throws java.lang.Exception
doubleNaN = doubleNaN
selects no messages, when the double property 'doubleNaN' is set,
with value Double.NaN
(as NaN != NaN)java.lang.Exception
- for any errorpublic void testDoubleNaN2() throws java.lang.Exception
doubleNaN <> doubleNaN
selects all messages, when the double property 'doubleNaN' is set,
with value Double.NaN
java.lang.Exception
- for any errorpublic void testInvalid1() throws java.lang.Exception
1.0
throws
InvalidSelectorExceptionjava.lang.Exception
- for any errorpublic void testInvalid2() throws java.lang.Exception
-1.0
throws
InvalidSelectorExceptionjava.lang.Exception
- for any errorpublic void testInvalid3() throws java.lang.Exception
2.0 < '3.0'
throws
InvalidSelectorExceptionjava.lang.Exception
- for any errorpublic void testInvalid4() throws java.lang.Exception
1.0 <> false
throws
InvalidSelectorExceptionjava.lang.Exception
- for any errorpublic void testInvalid5() throws java.lang.Exception
1a.0 = 1a.0
throws
InvalidSelectorExceptionjava.lang.Exception
- for any error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |