本文整理汇总了Java中org.apache.qpid.proton.amqp.UnsignedLong.toString方法的典型用法代码示例。如果您正苦于以下问题:Java UnsignedLong.toString方法的具体用法?Java UnsignedLong.toString怎么用?Java UnsignedLong.toString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.qpid.proton.amqp.UnsignedLong
的用法示例。
在下文中一共展示了UnsignedLong.toString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testToMessageIdStringWithUnsignedLong
import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
* Test that {@link AMQPMessageIdHelper#toMessageIdString(Object)} returns a
* string indicating an AMQP encoded ulong when given a UnsignedLong object.
*/
@Test
public void testToMessageIdStringWithUnsignedLong() {
UnsignedLong uLongMessageId = UnsignedLong.valueOf(123456789L);
String expected = AMQPMessageIdHelper.JMS_ID_PREFIX + AMQPMessageIdHelper.AMQP_ULONG_PREFIX + uLongMessageId.toString();
doToMessageIdTestImpl(uLongMessageId, expected);
}
示例2: testToCorrelationIdStringWithUnsignedLong
import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
* Test that {@link AMQPMessageIdHelper#toCorrelationIdString(Object)}
* returns a string indicating an AMQP encoded ulong when given a
* UnsignedLong object.
*/
@Test
public void testToCorrelationIdStringWithUnsignedLong() {
UnsignedLong uLongCorrelationId = UnsignedLong.valueOf(123456789L);
String expected = AMQPMessageIdHelper.JMS_ID_PREFIX + AMQPMessageIdHelper.AMQP_ULONG_PREFIX + uLongCorrelationId.toString();
doToCorrelationIDTestImpl(uLongCorrelationId, expected);
}
示例3: testReceivedMessageWithLongCorrelationIdReturnsExpectedJMSCorrelationID
import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
* Tests that receiving a message with a UUID typed correlation-id results in returning the
* expected value for JMSCorrelationID where the JMS "ID:" prefix has been added to the UUID.tostring()
*
* @throws Exception if an error occurs during the test.
*/
@Test(timeout = 20000)
public void testReceivedMessageWithLongCorrelationIdReturnsExpectedJMSCorrelationID() throws Exception {
UnsignedLong underlyingCorrelationId = UnsignedLong.valueOf(123456789L);
String expected = "ID:AMQP_ULONG:" + underlyingCorrelationId.toString();
receivedMessageWithCorrelationIdTestImpl(underlyingCorrelationId, expected);
}
示例4: testGetCorrelationIdOnReceivedMessageWithUnsignedLong
import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
* Test that getting the correlationId when using an underlying received message with a
* ulong correlation id (using BigInteger) returns the expected value.
*/
@Test
public void testGetCorrelationIdOnReceivedMessageWithUnsignedLong() {
UnsignedLong testCorrelationId = UnsignedLong.valueOf(123456789L);
String expected = AmqpMessageIdHelper.JMS_ID_PREFIX + AmqpMessageIdHelper.AMQP_ULONG_PREFIX + testCorrelationId.toString();
correlationIdOnReceivedMessageTestImpl(testCorrelationId, expected, false);
}
示例5: testToMessageIdStringWithUnsignedLong
import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
* Test that {@link AmqpMessageIdHelper#toMessageIdString(Object)} returns a string
* indicating an AMQP encoded ulong when given a UnsignedLong object.
*/
@Test
public void testToMessageIdStringWithUnsignedLong() {
UnsignedLong uLongMessageId = UnsignedLong.valueOf(123456789L);
String expected = AmqpMessageIdHelper.JMS_ID_PREFIX + AmqpMessageIdHelper.AMQP_ULONG_PREFIX + uLongMessageId.toString();
doToMessageIdTestImpl(uLongMessageId, expected);
}
示例6: testToCorrelationIdStringWithUnsignedLong
import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
* Test that {@link AmqpMessageIdHelper#toCorrelationIdString(Object)} returns a string
* indicating an AMQP encoded ulong when given a UnsignedLong object.
*/
@Test
public void testToCorrelationIdStringWithUnsignedLong() {
UnsignedLong uLongCorrelationId = UnsignedLong.valueOf(123456789L);
String expected = AmqpMessageIdHelper.JMS_ID_PREFIX + AmqpMessageIdHelper.AMQP_ULONG_PREFIX + uLongCorrelationId.toString();
doToCorrelationIDTestImpl(uLongCorrelationId, expected);
}
示例7: testSentMessageWithUlongCorrelationId
import org.apache.qpid.proton.amqp.UnsignedLong; //导入方法依赖的package包/类
/**
* Tests that sending a message with a ulong typed correlation-id value which is a
* message-id results in an AMQP message with the expected encoding of the correlation-id,
* where the type is ulong, the "ID:" prefix of the JMSCorrelationID value is (obviously) not present.
*
* @throws Exception if an error occurs during the test.
*/
@Test(timeout = 20000)
public void testSentMessageWithUlongCorrelationId() throws Exception {
UnsignedLong ulong = UnsignedLong.valueOf(Long.MAX_VALUE);
String stringCorrelationId = AmqpMessageIdHelper.JMS_ID_PREFIX + AmqpMessageIdHelper.AMQP_ULONG_PREFIX + ulong.toString();
sentMessageWithCorrelationIdTestImpl(stringCorrelationId, ulong);
}