Package javax.jms

Examples of javax.jms.BytesMessage.readByte()


         {
            BytesMessage copiedBytes = (BytesMessage)copiedMessage;

            for (int i = 0; i < copiedBytes.getBodyLength(); i++)
            {
               Assert.assertEquals(UnitTestCase.getSamplebyte(i), copiedBytes.readByte());
            }
         }
         else if (copiedMessage instanceof MapMessage)
         {
            MapMessage copiedMap = (MapMessage)copiedMessage;
View Full Code Here


      super.assertEquivalent(m, mode, redelivered);

      BytesMessage bm = (BytesMessage)m;

      ProxyAssertSupport.assertEquals(true, bm.readBoolean());
      ProxyAssertSupport.assertEquals((byte)3, bm.readByte());
      byte[] bytes = new byte[3];
      bm.readBytes(bytes);
      ProxyAssertSupport.assertEquals((byte)4, bytes[0]);
      ProxyAssertSupport.assertEquals((byte)5, bytes[1]);
      ProxyAssertSupport.assertEquals((byte)6, bytes[2]);
View Full Code Here

      sendFrame(baos.toByteArray());

      BytesMessage message = (BytesMessage)consumer.receive(10000);
      Assert.assertNotNull(message);
      assertEquals(data.length, message.getBodyLength());
      assertEquals(data[0], message.readByte());
      assertEquals(data[1], message.readByte());
      assertEquals(data[2], message.readByte());
      assertEquals(data[3], message.readByte());
   }
View Full Code Here

      BytesMessage message = (BytesMessage)consumer.receive(10000);
      Assert.assertNotNull(message);
      assertEquals(data.length, message.getBodyLength());
      assertEquals(data[0], message.readByte());
      assertEquals(data[1], message.readByte());
      assertEquals(data[2], message.readByte());
      assertEquals(data[3], message.readByte());
   }

   public void testJMSXGroupIdCanBeSet() throws Exception
View Full Code Here

      BytesMessage message = (BytesMessage)consumer.receive(10000);
      Assert.assertNotNull(message);
      assertEquals(data.length, message.getBodyLength());
      assertEquals(data[0], message.readByte());
      assertEquals(data[1], message.readByte());
      assertEquals(data[2], message.readByte());
      assertEquals(data[3], message.readByte());
   }

   public void testJMSXGroupIdCanBeSet() throws Exception
   {
View Full Code Here

      Assert.assertNotNull(message);
      assertEquals(data.length, message.getBodyLength());
      assertEquals(data[0], message.readByte());
      assertEquals(data[1], message.readByte());
      assertEquals(data[2], message.readByte());
      assertEquals(data[3], message.readByte());
   }

   public void testJMSXGroupIdCanBeSet() throws Exception
   {
View Full Code Here

            BytesMessage message = (BytesMessage)consumer.receive(1000);
            assertNotNull(message);
            assertTrue(message.readBoolean());

            try {
                message.readByte();
                fail("Expected exception not thrown.");
            } catch (MessageEOFException e) {
            }

        }
View Full Code Here

         {
            BytesMessage copiedBytes = (BytesMessage)copiedMessage;

            for (int i = 0; i < copiedBytes.getBodyLength(); i++)
            {
               Assert.assertEquals(UnitTestCase.getSamplebyte(i), copiedBytes.readByte());
            }
         }
         else if (copiedMessage instanceof MapMessage)
         {
            MapMessage copiedMap = (MapMessage)copiedMessage;
View Full Code Here

         assertNotNull(msg2);
         msg2.acknowledge();
        
         for (int j = 0; j < bytes.length; j++)
         {
            assertEquals("Position " + i, msg2.readByte(), bytes[j]);
         }
      }
     
      conn1.close();
      conn2.close();
View Full Code Here

      sendFrame(baos.toByteArray());

      BytesMessage message = (BytesMessage)consumer.receive(10000);
      Assert.assertNotNull(message);
      assertEquals(data.length, message.getBodyLength());
      assertEquals(data[0], message.readByte());
      assertEquals(data[1], message.readByte());
      assertEquals(data[2], message.readByte());
      assertEquals(data[3], message.readByte());
   }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.