Package com.humaorie.dollar.ArrayWrapper

Examples of com.humaorie.dollar.ArrayWrapper.ByteArrayWrapper.toByteArray()


    @Test
    public void unboxByteArray() {
        Byte[] boxed = new Byte[]{42, 43, 44};
        ByteArrayWrapper arrayWrapper = new ByteArrayWrapper(boxed);
        Assert.assertArrayEquals(new byte[]{42, 43, 44}, arrayWrapper.toByteArray());
    }

    @Test
    public void unboxByteArrayToCharArray() {
        Byte[] boxed = new Byte[] { 'f', 'o', 'o' };
View Full Code Here


    @Test
    public void unboxByteArrayWithNulls() {
        Byte[] boxed = new Byte[3];
        ByteArrayWrapper arrayWrapper = new ByteArrayWrapper(boxed);
        Assert.assertArrayEquals(new byte[]{0, 0, 0}, arrayWrapper.toByteArray());
    }

    @Test
    public void unboxShortArray() {
        final Short[] boxed = {42};
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.