Examples of readBigDecimal()


Examples of com.peterhi.obsolete.Stream.readBigDecimal()

      stream.writeBit(1);
     
      stream.readBit();

      for (BigDecimal number : numbers) {
        assertEquals(number, stream.readBigDecimal());
      }
     
      assertEquals(1, stream.getData().readable());
    } finally {
    }
View Full Code Here

Examples of com.peterhi.obsolete.Stream.readBigDecimal()

 
  @Test
  public void fReadBigDecimal_void() throws Exception {
    try {
      Stream stream = new Stream();
      stream.readBigDecimal();
      fail();
    } catch (EOFException ex) {
    }

    try {
View Full Code Here

Examples of com.peterhi.obsolete.Stream.readBigDecimal()

    }

    try {
      Stream stream = new Stream();
      stream.writeBit(1);
      stream.readBigDecimal();
      fail();
    } catch (InsufficientBufferException ex) {
    }
   
    try {
View Full Code Here

Examples of com.peterhi.obsolete.Stream.readBigDecimal()

    try {
      Stream stream = new Stream();
      stream.write(1);
      stream.write(1);
      stream.write(1);
      stream.readBigDecimal();
      fail();
    } catch (InsufficientBufferException ex) {
    }
  }
 
View Full Code Here

Examples of com.peterhi.obsolete.Stream.readBigDecimal()

      stream.writeBit(1);
     
      stream.readBit();
     
      for (BigDecimal number : numbers) {
        assertEquals(number, stream.readBigDecimal(number.unscaledValue().bitLength() + 1));
      }
     
      assertEquals(1, stream.getData().readable());
    } finally {
    }
View Full Code Here

Examples of com.peterhi.obsolete.Stream.readBigDecimal()

 
  @Test
  public void fReadBigDecimal_int() throws Exception {
    try {
      Stream stream = new Stream();
      stream.readBigDecimal(1);
      fail();
    } catch (EOFException ex) {
    }
   
    try {
View Full Code Here

Examples of com.peterhi.obsolete.Stream.readBigDecimal()

    }
   
    try {
      Stream stream = new Stream();
      stream.writeBit(1);
      stream.readBigDecimal(1);
      fail();
    } catch (InsufficientBufferException ex) {
    }
   
    try {
View Full Code Here

Examples of com.peterhi.obsolete.Stream.readBigDecimal()

    try {
      Stream stream = new Stream();
      stream.writeBit(1);
      stream.writeBit(1);
      stream.writeBit(1);
      stream.readBigDecimal(1);
      fail();
    } catch (InsufficientBufferException ex) {
    }
   
    try {
View Full Code Here

Examples of com.peterhi.obsolete.Stream.readBigDecimal()

    }
   
    try {
      Stream stream = new Stream();
      stream.write(1);
      stream.readBigDecimal(0);
      fail();
    } catch (InsufficientBufferException ex) {
    }
  }
 
View Full Code Here

Examples of javax.sql.rowset.serial.SQLInputImpl.readBigDecimal()

    public void testReadBigDecimal() throws SQLException {
        BigDecimal bd = new BigDecimal("12.5");
        Object[] attributes = new Object[] { bd };
        SQLInputImpl impl = new SQLInputImpl(attributes,
                new HashMap<String, Class<?>>());
        assertEquals(bd, impl.readBigDecimal());

        try {
            impl.readBigDecimal();
            fail("should throw SQLException");
        } catch (SQLException e) {
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.