|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTestCase
org.objectweb.jtests.jms.framework.JMSTestCase (src)
org.objectweb.jtests.jms.framework.PTPTestCase (src)
org.objectweb.jtests.jms.conform.message.properties.MessagePropertyConversionTest
Test the conversion of primitive types for the javax.jms.Message
properties.
See JMS Specification, §3.5.4 Property Value Conversion and the corresponding table (p.33-34).
The method name testXXX2YYY
means that we test if a property
which has been set as a XXX
type can be read as a YYY
type,
where XXX
and YYY
can be boolean, byte, short, long, float
double
or String
.
---------------------------------------------------------------| | boolean | byte | short | int | long | float | double | String| |-----------------------------------------------------------------------| |boolean | X X | |byte | X X X X X | |short | X X X X | |int | X X X | |long | X X | |float | X X X | |double | X X | |String | Y Y Y Y Y Y Y X | |-----------------------------------------------------------------------|A value set as the row type can be read as the column type.
javax.jms.MessageFormatException
java.lang.MessageFormatException
if the
String is not a correct representation of the column type (otherwise, it returns the property).
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 | |
MessagePropertyConversionTest(java.lang.String name)
|
Method Summary | |
static Test |
suite()
Method to use this class in a Test suite |
void |
testBoolean2Boolean()
if a property is set as a boolean ,
it can also be read as a boolean . |
void |
testBoolean2Byte()
if a property is set as a boolean ,
to get is as a byte throws a javax.jms.MessageFormatException . |
void |
testBoolean2Double()
if a property is set as a boolean ,
to get is as a double throws a javax.jms.MessageFormatException . |
void |
testBoolean2Float()
if a property is set as a boolean ,
to get is as a float throws a javax.jms.MessageFormatException . |
void |
testBoolean2Int()
if a property is set as a boolean ,
to get is as a int throws a javax.jms.MessageFormatException . |
void |
testBoolean2Long()
if a property is set as a boolean ,
to get is as a long throws a javax.jms.MessageFormatException . |
void |
testBoolean2Short()
if a property is set as a boolean ,
to get is as a short throws a javax.jms.MessageFormatException . |
void |
testBoolean2String()
if a property is set as a boolean ,
it can also be read as a String . |
void |
testByte2Boolean()
if a property is set as a byte ,
to get is as a boolean throws a javax.jms.MessageFormatException . |
void |
testByte2Byte()
if a property is set as a byte ,
it can also be read as a byte . |
void |
testByte2Double()
if a property is set as a byte ,
to get is as a double throws a javax.jms.MessageFormatException . |
void |
testByte2Float()
if a property is set as a byte ,
to get is as a float throws a javax.jms.MessageFormatException . |
void |
testByte2Int()
if a property is set as a byte ,
it can also be read as an int . |
void |
testByte2Long()
if a property is set as a byte ,
it can also be read as a long . |
void |
testByte2Short()
if a property is set as a byte ,
it can also be read as a short . |
void |
testByte2String()
if a property is set as a byte ,
it can also be read as a String . |
void |
testDouble2Boolean()
if a property is set as a double ,
to get is as a boolean throws a javax.jms.MessageFormatException . |
void |
testDouble2Byte()
if a property is set as a double ,
to get is as a byte throws a javax.jms.MessageFormatException . |
void |
testDouble2Double()
if a property is set as a double ,
it can also be read as a double . |
void |
testDouble2Float()
if a property is set as a double ,
to get is as a float throws a javax.jms.MessageFormatException . |
void |
testDouble2Int()
if a property is set as a double ,
to get is as an int throws a javax.jms.MessageFormatException . |
void |
testDouble2Long()
if a property is set as a double ,
to get is as a long throws a javax.jms.MessageFormatException . |
void |
testDouble2Short()
if a property is set as a double ,
to get is as a short throws a javax.jms.MessageFormatException . |
void |
testDouble2String()
if a property is set as a double ,
it can also be read as a java.lang.String . |
void |
testFloat2Boolean()
if a property is set as a float ,
to get is as a boolean throws a javax.jms.MessageFormatException . |
void |
testFloat2Byte()
if a property is set as a float ,
to get is as a byte throws a javax.jms.MessageFormatException . |
void |
testFloat2Double()
if a property is set as a float ,
it can also be read as a double . |
void |
testFloat2Float()
if a property is set as a float ,
it can also be read as a float . |
void |
testFloat2Int()
if a property is set as a float ,
to get is as a int throws a javax.jms.MessageFormatException . |
void |
testFloat2Long()
if a property is set as a float ,
to get is as a long throws a javax.jms.MessageFormatException . |
void |
testFloat2Short()
if a property is set as a float ,
to get is as a short throws a javax.jms.MessageFormatException . |
void |
testFloat2String()
if a property is set as a float ,
it can also be read as a String . |
void |
testInt2Boolean()
if a property is set as a int ,
to get is as a boolean throws a javax.jms.MessageFormatException . |
void |
testInt2Byte()
if a property is set as a int ,
to get is as a byte throws a javax.jms.MessageFormatException . |
void |
testInt2Double()
if a property is set as a int ,
to get is as a double throws a javax.jms.MessageFormatException . |
void |
testInt2Float()
if a property is set as a int ,
to get is as a float throws a javax.jms.MessageFormatException . |
void |
testInt2Int()
if a property is set as an int ,
it can also be read as an int . |
void |
testInt2Long()
if a property is set as an int ,
it can also be read as a long . |
void |
testInt2Short()
if a property is set as a int ,
to get is as a short throws a javax.jms.MessageFormatException . |
void |
testInt2String()
if a property is set as an int ,
it can also be read as a String . |
void |
testLong2Boolean()
if a property is set as a long ,
to get is as a boolean throws a javax.jms.MessageFormatException . |
void |
testLong2Byte()
if a property is set as a long ,
to get is as a byte throws a javax.jms.MessageFormatException . |
void |
testLong2Double()
if a property is set as a long ,
to get is as a double throws a javax.jms.MessageFormatException . |
void |
testLong2Float()
if a property is set as a long ,
to get is as a float throws a javax.jms.MessageFormatException . |
void |
testLong2Int()
if a property is set as a long ,
to get is as an int throws a javax.jms.MessageFormatException . |
void |
testLong2Long()
if a property is set as a long ,
it can also be read as a long . |
void |
testLong2Short()
if a property is set as a long ,
to get is as a short throws a javax.jms.MessageFormatException . |
void |
testLong2String()
if a property is set as a long ,
it can also be read as a String . |
void |
testShort2Boolean()
if a property is set as a short ,
to get is as a boolean throws a javax.jms.MessageFormatException . |
void |
testShort2Byte()
if a property is set as a short ,
to get is as a byte throws a javax.jms.MessageFormatException . |
void |
testShort2Double()
if a property is set as a short ,
to get is as a double throws a javax.jms.MessageFormatException . |
void |
testShort2Float()
if a property is set as a short ,
to get is as a float throws a javax.jms.MessageFormatException . |
void |
testShort2Int()
if a property is set as a short ,
it can also be read as an int . |
void |
testShort2Long()
if a property is set as a short ,
it can also be read as a long . |
void |
testShort2Short()
if a property is set as a short ,
it can also be read as a short . |
void |
testShort2String()
if a property is set as a short ,
it can also be read as a String . |
void |
testString2Boolean_1()
if a property is set as a java.lang.String ,
it can also be read as a boolean if the String
is a correct representation of a boolean (e.g. |
void |
testString2Boolean_2()
if a property is set as a java.lang.String ,
to get it as a boolean returns true if the property is not
null and is equal, ignoring case, to the string "true" (.eg. |
void |
testString2Byte_1()
if a property is set as a java.lang.String ,
it can also be read as a byte if the String
is a correct representation of a byte (e.g. |
void |
testString2Byte_2()
if a property is set as a java.lang.String ,
to get it as a byte throws a java.lang.NuberFormatException
if the String is not a correct representation for a byte
(e.g. |
void |
testString2Double_1()
if a property is set as a java.lang.String ,
it can also be read as a double as long as the String
is a correct representation of a double (e.g. |
void |
testString2Double_2()
if a property is set as a java.lang.String ,
to get it as a double throws a java.lang.NuberFormatException
if the String is not a correct representation for a double
(e.g. |
void |
testString2Float_1()
if a property is set as a java.lang.String ,
it can also be read as a float as long as the String
is a correct representation of a float (e.g. |
void |
testString2Float_2()
if a property is set as a java.lang.String ,
to get it as a float throws a java.lang.NuberFormatException
if the String is not a correct representation for a float
(e.g. |
void |
testString2Int_1()
if a property is set as a java.lang.String ,
it can also be read as a int as long as the String
is a correct representation of a int (e.g. |
void |
testString2Int_2()
if a property is set as a java.lang.String ,
to get it as a int throws a java.lang.NuberFormatException
if the String is not a correct representation for a int
(e.g. |
void |
testString2Long_1()
if a property is set as a java.lang.String ,
it can also be read as a long as long as the String
is a correct representation of a long (e.g. |
void |
testString2Long_2()
if a property is set as a java.lang.String ,
to get it as a long throws a java.lang.NuberFormatException
if the String is not a correct representation for a long
(e.g. |
void |
testString2Short_1()
if a property is set as a java.lang.String ,
it can also be read as a short as long as the String
is a correct representation of a short (e.g. |
void |
testString2Short_2()
if a property is set as a java.lang.String ,
to get it as a short throws a java.lang.NuberFormatException
if the String is not a correct representation for a short
(e.g. |
void |
testString2String()
if a property is set as a java.lang.String ,
it can also be read as a java.lang.String . |
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 |
public MessagePropertyConversionTest(java.lang.String name)
Method Detail |
public void testString2String()
java.lang.String
,
it can also be read as a java.lang.String
.
public void testString2Double_2()
java.lang.String
,
to get it as a double
throws a java.lang.NuberFormatException
if the String
is not a correct representation for a double
(e.g. "not a number"
).
public void testString2Double_1()
java.lang.String
,
it can also be read as a double
as long as the String
is a correct representation of a double
(e.g. "3.14159"
).
public void testString2Float_2()
java.lang.String
,
to get it as a float
throws a java.lang.NuberFormatException
if the String
is not a correct representation for a float
(e.g. "not_a_number"
).
public void testString2Float_1()
java.lang.String
,
it can also be read as a float
as long as the String
is a correct representation of a float
(e.g. "3.14159"
).
public void testString2Long_2()
java.lang.String
,
to get it as a long
throws a java.lang.NuberFormatException
if the String
is not a correct representation for a long
(e.g. "3.14159"
).
public void testString2Long_1()
java.lang.String
,
it can also be read as a long
as long as the String
is a correct representation of a long
(e.g. "0"
).
public void testString2Int_2()
java.lang.String
,
to get it as a int
throws a java.lang.NuberFormatException
if the String
is not a correct representation for a int
(e.g. "3.14159"
).
public void testString2Int_1()
java.lang.String
,
it can also be read as a int
as long as the String
is a correct representation of a int
(e.g. "0"
).
public void testString2Short_2()
java.lang.String
,
to get it as a short
throws a java.lang.NuberFormatException
if the String
is not a correct representation for a short
(e.g. "3.14159"
).
public void testString2Short_1()
java.lang.String
,
it can also be read as a short
as long as the String
is a correct representation of a short
(e.g. "0"
).
public void testString2Byte_2()
java.lang.String
,
to get it as a byte
throws a java.lang.NuberFormatException
if the String
is not a correct representation for a byte
(e.g. "3.14159"
).
public void testString2Byte_1()
java.lang.String
,
it can also be read as a byte
if the String
is a correct representation of a byte
(e.g. "0"
).
public void testString2Boolean_2()
java.lang.String
,
to get it as a boolean
returns true
if the property is not
null and is equal, ignoring case, to the string "true" (.eg. "True" is ok), else it
returns false
(e.g. "test")
public void testString2Boolean_1()
java.lang.String
,
it can also be read as a boolean
if the String
is a correct representation of a boolean
(e.g. "true"
).
public void testDouble2String()
double
,
it can also be read as a java.lang.String
.
public void testDouble2Double()
double
,
it can also be read as a double
.
public void testDouble2Float()
double
,
to get is as a float
throws a javax.jms.MessageFormatException
.
public void testDouble2Long()
double
,
to get is as a long
throws a javax.jms.MessageFormatException
.
public void testDouble2Int()
double
,
to get is as an int
throws a javax.jms.MessageFormatException
.
public void testDouble2Short()
double
,
to get is as a short
throws a javax.jms.MessageFormatException
.
public void testDouble2Byte()
double
,
to get is as a byte
throws a javax.jms.MessageFormatException
.
public void testDouble2Boolean()
double
,
to get is as a boolean
throws a javax.jms.MessageFormatException
.
public void testFloat2String()
float
,
it can also be read as a String
.
public void testFloat2Double()
float
,
it can also be read as a double
.
public void testFloat2Float()
float
,
it can also be read as a float
.
public void testFloat2Long()
float
,
to get is as a long
throws a javax.jms.MessageFormatException
.
public void testFloat2Int()
float
,
to get is as a int
throws a javax.jms.MessageFormatException
.
public void testFloat2Short()
float
,
to get is as a short
throws a javax.jms.MessageFormatException
.
public void testFloat2Byte()
float
,
to get is as a byte
throws a javax.jms.MessageFormatException
.
public void testFloat2Boolean()
float
,
to get is as a boolean
throws a javax.jms.MessageFormatException
.
public void testLong2String()
long
,
it can also be read as a String
.
public void testLong2Double()
long
,
to get is as a double
throws a javax.jms.MessageFormatException
.
public void testLong2Float()
long
,
to get is as a float
throws a javax.jms.MessageFormatException
.
public void testLong2Long()
long
,
it can also be read as a long
.
public void testLong2Int()
long
,
to get is as an int
throws a javax.jms.MessageFormatException
.
public void testLong2Short()
long
,
to get is as a short
throws a javax.jms.MessageFormatException
.
public void testLong2Byte()
long
,
to get is as a byte
throws a javax.jms.MessageFormatException
.
public void testLong2Boolean()
long
,
to get is as a boolean
throws a javax.jms.MessageFormatException
.
public void testInt2String()
int
,
it can also be read as a String
.
public void testInt2Double()
int
,
to get is as a double
throws a javax.jms.MessageFormatException
.
public void testInt2Float()
int
,
to get is as a float
throws a javax.jms.MessageFormatException
.
public void testInt2Long()
int
,
it can also be read as a long
.
public void testInt2Int()
int
,
it can also be read as an int
.
public void testInt2Short()
int
,
to get is as a short
throws a javax.jms.MessageFormatException
.
public void testInt2Byte()
int
,
to get is as a byte
throws a javax.jms.MessageFormatException
.
public void testInt2Boolean()
int
,
to get is as a boolean
throws a javax.jms.MessageFormatException
.
public void testShort2String()
short
,
it can also be read as a String
.
public void testShort2Double()
short
,
to get is as a double
throws a javax.jms.MessageFormatException
.
public void testShort2Float()
short
,
to get is as a float
throws a javax.jms.MessageFormatException
.
public void testShort2Long()
short
,
it can also be read as a long
.
public void testShort2Int()
short
,
it can also be read as an int
.
public void testShort2Short()
short
,
it can also be read as a short
.
public void testShort2Byte()
short
,
to get is as a byte
throws a javax.jms.MessageFormatException
.
public void testShort2Boolean()
short
,
to get is as a boolean
throws a javax.jms.MessageFormatException
.
public void testByte2String()
byte
,
it can also be read as a String
.
public void testByte2Double()
byte
,
to get is as a double
throws a javax.jms.MessageFormatException
.
public void testByte2Float()
byte
,
to get is as a float
throws a javax.jms.MessageFormatException
.
public void testByte2Long()
byte
,
it can also be read as a long
.
public void testByte2Int()
byte
,
it can also be read as an int
.
public void testByte2Short()
byte
,
it can also be read as a short
.
public void testByte2Byte()
byte
,
it can also be read as a byte
.
public void testByte2Boolean()
byte
,
to get is as a boolean
throws a javax.jms.MessageFormatException
.
public void testBoolean2String()
boolean
,
it can also be read as a String
.
public void testBoolean2Double()
boolean
,
to get is as a double
throws a javax.jms.MessageFormatException
.
public void testBoolean2Float()
boolean
,
to get is as a float
throws a javax.jms.MessageFormatException
.
public void testBoolean2Long()
boolean
,
to get is as a long
throws a javax.jms.MessageFormatException
.
public void testBoolean2Int()
boolean
,
to get is as a int
throws a javax.jms.MessageFormatException
.
public void testBoolean2Short()
boolean
,
to get is as a short
throws a javax.jms.MessageFormatException
.
public void testBoolean2Byte()
boolean
,
to get is as a byte
throws a javax.jms.MessageFormatException
.
public void testBoolean2Boolean()
boolean
,
it can also be read as a boolean
.
public static Test suite()
|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |