|
|||||||||
| Home >> All >> org >> objectweb >> jtests >> jms >> conform >> message >> [ properties overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.objectweb.jtests.jms.conform.message.properties
Class MessagePropertyConversionTest

java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.objectweb.jtests.jms.framework.JMSTestCase
org.objectweb.jtests.jms.framework.PTPTestCase
org.objectweb.jtests.jms.conform.message.properties.MessagePropertyConversionTest
- All Implemented Interfaces:
- junit.framework.Test
- public class MessagePropertyConversionTest
- extends org.objectweb.jtests.jms.framework.PTPTestCase
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.
The unmarked cases must throw a
javax.jms.MessageFormatException
The cases marked with a Y should throw a
java.lang.MessageFormatException if the
String is not a correct representation of the column type (otherwise, it returns the property).
- Version:
- $Id: MessagePropertyConversionTest.java,v 1.1.4.1 2003/05/31 00:35:11 ejort 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 | |
MessagePropertyConversionTest(java.lang.String name)
|
|
| Method Summary | |
static junit.framework.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 |
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 |
MessagePropertyConversionTest
public MessagePropertyConversionTest(java.lang.String name)
| Method Detail |
testString2String
public void testString2String()
- if a property is set as a
java.lang.String, it can also be read as ajava.lang.String.
testString2Double_2
public void testString2Double_2()
- if a property is set as a
java.lang.String, to get it as adoublethrows ajava.lang.NuberFormatExceptionif theStringis not a correct representation for adouble(e.g."not a number").
testString2Double_1
public void testString2Double_1()
- if a property is set as a
java.lang.String, it can also be read as adoubleas long as theStringis a correct representation of adouble(e.g."3.14159").
testString2Float_2
public void testString2Float_2()
- if a property is set as a
java.lang.String, to get it as afloatthrows ajava.lang.NuberFormatExceptionif theStringis not a correct representation for afloat(e.g."not_a_number").
testString2Float_1
public void testString2Float_1()
- if a property is set as a
java.lang.String, it can also be read as afloatas long as theStringis a correct representation of afloat(e.g."3.14159").
testString2Long_2
public void testString2Long_2()
- if a property is set as a
java.lang.String, to get it as alongthrows ajava.lang.NuberFormatExceptionif theStringis not a correct representation for along(e.g."3.14159").
testString2Long_1
public void testString2Long_1()
- if a property is set as a
java.lang.String, it can also be read as alongas long as theStringis a correct representation of along(e.g."0").
testString2Int_2
public void testString2Int_2()
- if a property is set as a
java.lang.String, to get it as aintthrows ajava.lang.NuberFormatExceptionif theStringis not a correct representation for aint(e.g."3.14159").
testString2Int_1
public void testString2Int_1()
- if a property is set as a
java.lang.String, it can also be read as aintas long as theStringis a correct representation of aint(e.g."0").
testString2Short_2
public void testString2Short_2()
- if a property is set as a
java.lang.String, to get it as ashortthrows ajava.lang.NuberFormatExceptionif theStringis not a correct representation for ashort(e.g."3.14159").
testString2Short_1
public void testString2Short_1()
- if a property is set as a
java.lang.String, it can also be read as ashortas long as theStringis a correct representation of ashort(e.g."0").
testString2Byte_2
public void testString2Byte_2()
- if a property is set as a
java.lang.String, to get it as abytethrows ajava.lang.NuberFormatExceptionif theStringis not a correct representation for abyte(e.g."3.14159").
testString2Byte_1
public void testString2Byte_1()
- if a property is set as a
java.lang.String, it can also be read as abyteif theStringis a correct representation of abyte(e.g."0").
testString2Boolean_2
public void testString2Boolean_2()
- if a property is set as a
java.lang.String, to get it as abooleanreturnstrueif the property is not null and is equal, ignoring case, to the string "true" (.eg. "True" is ok), else it returnsfalse(e.g. "test")
testString2Boolean_1
public void testString2Boolean_1()
- if a property is set as a
java.lang.String, it can also be read as abooleanif theStringis a correct representation of aboolean(e.g."true").
testDouble2String
public void testDouble2String()
- if a property is set as a
double, it can also be read as ajava.lang.String.
testDouble2Double
public void testDouble2Double()
- if a property is set as a
double, it can also be read as adouble.
testDouble2Float
public void testDouble2Float()
- if a property is set as a
double, to get is as afloatthrows ajavax.jms.MessageFormatException.
testDouble2Long
public void testDouble2Long()
- if a property is set as a
double, to get is as alongthrows ajavax.jms.MessageFormatException.
testDouble2Int
public void testDouble2Int()
- if a property is set as a
double, to get is as anintthrows ajavax.jms.MessageFormatException.
testDouble2Short
public void testDouble2Short()
- if a property is set as a
double, to get is as ashortthrows ajavax.jms.MessageFormatException.
testDouble2Byte
public void testDouble2Byte()
- if a property is set as a
double, to get is as abytethrows ajavax.jms.MessageFormatException.
testDouble2Boolean
public void testDouble2Boolean()
- if a property is set as a
double, to get is as abooleanthrows ajavax.jms.MessageFormatException.
testFloat2String
public void testFloat2String()
- if a property is set as a
float, it can also be read as aString.
testFloat2Double
public void testFloat2Double()
- if a property is set as a
float, it can also be read as adouble.
testFloat2Float
public void testFloat2Float()
- if a property is set as a
float, it can also be read as afloat.
testFloat2Long
public void testFloat2Long()
- if a property is set as a
float, to get is as alongthrows ajavax.jms.MessageFormatException.
testFloat2Int
public void testFloat2Int()
- if a property is set as a
float, to get is as aintthrows ajavax.jms.MessageFormatException.
testFloat2Short
public void testFloat2Short()
- if a property is set as a
float, to get is as ashortthrows ajavax.jms.MessageFormatException.
testFloat2Byte
public void testFloat2Byte()
- if a property is set as a
float, to get is as abytethrows ajavax.jms.MessageFormatException.
testFloat2Boolean
public void testFloat2Boolean()
- if a property is set as a
float, to get is as abooleanthrows ajavax.jms.MessageFormatException.
testLong2String
public void testLong2String()
- if a property is set as a
long, it can also be read as aString.
testLong2Double
public void testLong2Double()
- if a property is set as a
long, to get is as adoublethrows ajavax.jms.MessageFormatException.
testLong2Float
public void testLong2Float()
- if a property is set as a
long, to get is as afloatthrows ajavax.jms.MessageFormatException.
testLong2Long
public void testLong2Long()
- if a property is set as a
long, it can also be read as along.
testLong2Int
public void testLong2Int()
- if a property is set as a
long, to get is as anintthrows ajavax.jms.MessageFormatException.
testLong2Short
public void testLong2Short()
- if a property is set as a
long, to get is as ashortthrows ajavax.jms.MessageFormatException.
testLong2Byte
public void testLong2Byte()
- if a property is set as a
long, to get is as abytethrows ajavax.jms.MessageFormatException.
testLong2Boolean
public void testLong2Boolean()
- if a property is set as a
long, to get is as abooleanthrows ajavax.jms.MessageFormatException.
testInt2String
public void testInt2String()
- if a property is set as an
int, it can also be read as aString.
testInt2Double
public void testInt2Double()
- if a property is set as a
int, to get is as adoublethrows ajavax.jms.MessageFormatException.
testInt2Float
public void testInt2Float()
- if a property is set as a
int, to get is as afloatthrows ajavax.jms.MessageFormatException.
testInt2Long
public void testInt2Long()
- if a property is set as an
int, it can also be read as along.
testInt2Int
public void testInt2Int()
- if a property is set as an
int, it can also be read as anint.
testInt2Short
public void testInt2Short()
- if a property is set as a
int, to get is as ashortthrows ajavax.jms.MessageFormatException.
testInt2Byte
public void testInt2Byte()
- if a property is set as a
int, to get is as abytethrows ajavax.jms.MessageFormatException.
testInt2Boolean
public void testInt2Boolean()
- if a property is set as a
int, to get is as abooleanthrows ajavax.jms.MessageFormatException.
testShort2String
public void testShort2String()
- if a property is set as a
short, it can also be read as aString.
testShort2Double
public void testShort2Double()
- if a property is set as a
short, to get is as adoublethrows ajavax.jms.MessageFormatException.
testShort2Float
public void testShort2Float()
- if a property is set as a
short, to get is as afloatthrows ajavax.jms.MessageFormatException.
testShort2Long
public void testShort2Long()
- if a property is set as a
short, it can also be read as along.
testShort2Int
public void testShort2Int()
- if a property is set as a
short, it can also be read as anint.
testShort2Short
public void testShort2Short()
- if a property is set as a
short, it can also be read as ashort.
testShort2Byte
public void testShort2Byte()
- if a property is set as a
short, to get is as abytethrows ajavax.jms.MessageFormatException.
testShort2Boolean
public void testShort2Boolean()
- if a property is set as a
short, to get is as abooleanthrows ajavax.jms.MessageFormatException.
testByte2String
public void testByte2String()
- if a property is set as a
byte, it can also be read as aString.
testByte2Double
public void testByte2Double()
- if a property is set as a
byte, to get is as adoublethrows ajavax.jms.MessageFormatException.
testByte2Float
public void testByte2Float()
- if a property is set as a
byte, to get is as afloatthrows ajavax.jms.MessageFormatException.
testByte2Long
public void testByte2Long()
- if a property is set as a
byte, it can also be read as along.
testByte2Int
public void testByte2Int()
- if a property is set as a
byte, it can also be read as anint.
testByte2Short
public void testByte2Short()
- if a property is set as a
byte, it can also be read as ashort.
testByte2Byte
public void testByte2Byte()
- if a property is set as a
byte, it can also be read as abyte.
testByte2Boolean
public void testByte2Boolean()
- if a property is set as a
byte, to get is as abooleanthrows ajavax.jms.MessageFormatException.
testBoolean2String
public void testBoolean2String()
- if a property is set as a
boolean, it can also be read as aString.
testBoolean2Double
public void testBoolean2Double()
- if a property is set as a
boolean, to get is as adoublethrows ajavax.jms.MessageFormatException.
testBoolean2Float
public void testBoolean2Float()
- if a property is set as a
boolean, to get is as afloatthrows ajavax.jms.MessageFormatException.
testBoolean2Long
public void testBoolean2Long()
- if a property is set as a
boolean, to get is as alongthrows ajavax.jms.MessageFormatException.
testBoolean2Int
public void testBoolean2Int()
- if a property is set as a
boolean, to get is as aintthrows ajavax.jms.MessageFormatException.
testBoolean2Short
public void testBoolean2Short()
- if a property is set as a
boolean, to get is as ashortthrows ajavax.jms.MessageFormatException.
testBoolean2Byte
public void testBoolean2Byte()
- if a property is set as a
boolean, to get is as abytethrows ajavax.jms.MessageFormatException.
testBoolean2Boolean
public void testBoolean2Boolean()
- if a property is set as a
boolean, it can also be read as aboolean.
suite
public static junit.framework.Test suite()
- Method to use this class in a Test suite
|
|||||||||
| Home >> All >> org >> objectweb >> jtests >> jms >> conform >> message >> [ properties overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC