[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-cvs-commits
Subject: [jboss-cvs] jbosstest/src/main/org/objectweb/jtests/jms/conform/message/properties MessagePropertyCo
From: Adrian Brock <ejort () users ! sourceforge ! net>
Date: 2003-05-31 0:35:12
[Download RAW message or body]
User: ejort
Date: 03/05/30 17:35:12
Modified: src/main/org/objectweb/jtests/jms/conform/message/properties
Tag: Branch_3_2 MessagePropertyConversionTest.java
Log:
Uncomment the byte property tests
Revision Changes Path
No revision
No revision
1.1.4.1 +119 -119 \
jbosstest/src/main/org/objectweb/jtests/jms/conform/message/properties/MessagePropertyConversionTest.java
Index: MessagePropertyConversionTest.java
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/main/org/objectweb/jtests/jms/conform/message/properties/MessagePropertyConversionTest.java,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -r1.1 -r1.1.4.1
--- MessagePropertyConversionTest.java 21 Apr 2002 21:15:18 -0000 1.1
+++ MessagePropertyConversionTest.java 31 May 2003 00:35:11 -0000 1.1.4.1
@@ -60,7 +60,7 @@
* String is not a correct representation of the column type (otherwise, it \
returns the property).
*
* @author Jeff Mesnil (jmesnil@inrialpes.fr)
- * @version $Id: MessagePropertyConversionTest.java,v 1.1 2002/04/21 21:15:18 \
chirino Exp $ + * @version $Id: MessagePropertyConversionTest.java,v 1.1.4.1 \
2003/05/31 00:35:11 ejort Exp $
*/
public class MessagePropertyConversionTest extends PTPTestCase {
@@ -939,124 +939,124 @@
}
}
-// /**
-// * if a property is set as a <code>byte</code>,
-// * it can also be read as a <code>String</code>.
-// */
-// public void testByte2String() {
-// try {
-// Message message = senderSession.createMessage();
-// message.setByteProperty("prop", (byte)127);
-// assertEquals("127", message.getStringProperty("prop"));
-// } catch (JMSException e) {
-// fail(e);
-// }
-// }
-//
-// /**
-// * if a property is set as a <code>byte</code>,
-// * to get is as a <code>double</code> throws a \
<code>javax.jms.MessageFormatException</code>.
-// */
-// public void testByte2Double() {
-// try {
-// Message message = senderSession.createMessage();
-// message.setByteProperty("prop", (byte)127);
-// message.getDoubleProperty("prop");
-// fail("§3.5.4 The unmarked cases [of Table 0-4] should raise a JMS \
MessageFormatException.\n");
-// } catch (MessageFormatException e) {
-// } catch (JMSException e) {
-// fail(e);
-// }
-// }
-//
-// /**
-// * if a property is set as a <code>byte</code>,
-// * to get is as a <code>float</code> throws a \
<code>javax.jms.MessageFormatException</code>.
-// */
-// public void testByte2Float() {
-// try {
-// Message message = senderSession.createMessage();
-// message.setByteProperty("prop", (byte)127);
-// message.getFloatProperty("prop");
-// fail("§3.5.4 The unmarked cases [of Table 0-4] should raise a JMS \
MessageFormatException.\n");
-// } catch (MessageFormatException e) {
-// } catch (JMSException e) {
-// fail(e);
-// }
-// }
-//
-// /**
-// * if a property is set as a <code>byte</code>,
-// * it can also be read as a <code>long</code>.
-// */
-// public void testByte2Long() {
-// try {
-// Message message = senderSession.createMessage();
-// message.setByteProperty("prop", (byte)127);
-// assertEquals(127L, message.getLongProperty("prop"));
-// } catch (JMSException e) {
-// fail(e);
-// }
-// }
-//
-// /**
-// * if a property is set as a <code>byte</code>,
-// * it can also be read as an <code>int</code>.
-// */
-// public void testByte2Int() {
-// try {
-// Message message = senderSession.createMessage();
-// message.setByteProperty("prop", (byte)127);
-// assertEquals((int)127, message.getIntProperty("prop"));
-// } catch (JMSException e) {
-// fail(e);
-// }
-// }
-//
-// /**
-// * if a property is set as a <code>byte</code>,
-// * it can also be read as a <code>short</code>.
-// */
-// public void testByte2Short() {
-// try {
-// Message message = senderSession.createMessage();
-// message.setByteProperty("prop", (byte)127);
-// assertEquals((short)127, message.getShortProperty("prop"));
-// } catch (JMSException e) {
-// fail(e);
-// }
-// }
-//
-// /**
-// * if a property is set as a <code>byte</code>,
-// * it can also be read as a <code>byte</code>.
-// */
-// public void testByte2Byte() {
-// try {
-// Message message = senderSession.createMessage();
-// message.setByteProperty("prop", (byte)127);
-// assertEquals((byte)127, message.getByteProperty("prop"));
-// } catch (JMSException e) {
-// fail(e);
-// }
-// }
-//
-// /**
-// * if a property is set as a <code>byte</code>,
-// * to get is as a <code>boolean</code> throws a \
<code>javax.jms.MessageFormatException</code>.
-// */
-// public void testByte2Boolean() {
-// try {
-// Message message = senderSession.createMessage();
-// // store a value that can't be converted to boolean
-// message.setByteProperty("prop", (byte)127);
-// message.getBooleanProperty("prop");
-// fail("§3.5.4 The unmarked cases [of Table 0-4] should raise a JMS \
MessageFormatException.\n");
-// } catch (MessageFormatException e) {
-// } catch (JMSException e) {
-// fail(e);
-// }
-// }
+ /**
+ * if a property is set as a <code>byte</code>,
+ * it can also be read as a <code>String</code>.
+ */
+ public void testByte2String() {
+ try {
+ Message message = senderSession.createMessage();
+ message.setByteProperty("prop", (byte)127);
+ assertEquals("127", message.getStringProperty("prop"));
+ } catch (JMSException e) {
+ fail(e);
+ }
+ }
+
+ /**
+ * if a property is set as a <code>byte</code>,
+ * to get is as a <code>double</code> throws a \
<code>javax.jms.MessageFormatException</code>. + */
+ public void testByte2Double() {
+ try {
+ Message message = senderSession.createMessage();
+ message.setByteProperty("prop", (byte)127);
+ message.getDoubleProperty("prop");
+ fail("§3.5.4 The unmarked cases [of Table 0-4] should raise a JMS \
MessageFormatException.\n"); + } catch (MessageFormatException e) {
+ } catch (JMSException e) {
+ fail(e);
+ }
+ }
+
+ /**
+ * if a property is set as a <code>byte</code>,
+ * to get is as a <code>float</code> throws a \
<code>javax.jms.MessageFormatException</code>. + */
+ public void testByte2Float() {
+ try {
+ Message message = senderSession.createMessage();
+ message.setByteProperty("prop", (byte)127);
+ message.getFloatProperty("prop");
+ fail("§3.5.4 The unmarked cases [of Table 0-4] should raise a JMS \
MessageFormatException.\n"); + } catch (MessageFormatException e) {
+ } catch (JMSException e) {
+ fail(e);
+ }
+ }
+
+ /**
+ * if a property is set as a <code>byte</code>,
+ * it can also be read as a <code>long</code>.
+ */
+ public void testByte2Long() {
+ try {
+ Message message = senderSession.createMessage();
+ message.setByteProperty("prop", (byte)127);
+ assertEquals(127L, message.getLongProperty("prop"));
+ } catch (JMSException e) {
+ fail(e);
+ }
+ }
+
+ /**
+ * if a property is set as a <code>byte</code>,
+ * it can also be read as an <code>int</code>.
+ */
+ public void testByte2Int() {
+ try {
+ Message message = senderSession.createMessage();
+ message.setByteProperty("prop", (byte)127);
+ assertEquals((int)127, message.getIntProperty("prop"));
+ } catch (JMSException e) {
+ fail(e);
+ }
+ }
+
+ /**
+ * if a property is set as a <code>byte</code>,
+ * it can also be read as a <code>short</code>.
+ */
+ public void testByte2Short() {
+ try {
+ Message message = senderSession.createMessage();
+ message.setByteProperty("prop", (byte)127);
+ assertEquals((short)127, message.getShortProperty("prop"));
+ } catch (JMSException e) {
+ fail(e);
+ }
+ }
+
+ /**
+ * if a property is set as a <code>byte</code>,
+ * it can also be read as a <code>byte</code>.
+ */
+ public void testByte2Byte() {
+ try {
+ Message message = senderSession.createMessage();
+ message.setByteProperty("prop", (byte)127);
+ assertEquals((byte)127, message.getByteProperty("prop"));
+ } catch (JMSException e) {
+ fail(e);
+ }
+ }
+
+ /**
+ * if a property is set as a <code>byte</code>,
+ * to get is as a <code>boolean</code> throws a \
<code>javax.jms.MessageFormatException</code>. + */
+ public void testByte2Boolean() {
+ try {
+ Message message = senderSession.createMessage();
+ // store a value that can't be converted to boolean
+ message.setByteProperty("prop", (byte)127);
+ message.getBooleanProperty("prop");
+ fail("§3.5.4 The unmarked cases [of Table 0-4] should raise a JMS \
MessageFormatException.\n"); + } catch (MessageFormatException e) {
+ } catch (JMSException e) {
+ fail(e);
+ }
+ }
/**
* if a property is set as a <code>boolean</code>,
-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic