Package org.codehaus.preon

Examples of org.codehaus.preon.Codec


        ByteAligningDecorator decorator = new ByteAligningDecorator();
        expect(codec.decode(buffer, resolver, builder)).andReturn(new Object());
        expect(buffer.getBitPos()).andReturn(12L).anyTimes();
        buffer.setBitPos(16L);
        replay(codec, metadata, buffer, resolver, context);
        Codec decorated = decorator.decorate(codec, metadata, Test1.class, context);
        assertNotSame(decorated, codec);
        decorated.decode(buffer, resolver, builder);
        verify(codec, metadata, buffer, resolver, context);
    }
View Full Code Here


        expect(codec.decode(buffer, resolver, builder)).andReturn(new Object());
        expect(buffer.getBitPos()).andReturn(12L).anyTimes();
        expect(metadata.isAnnotationPresent(ByteAlign.class)).andReturn(true);
        buffer.setBitPos(16L);
        replay(codec, metadata, buffer, resolver, context);
        Codec decorated = decorator.decorate(codec, metadata, Test2.class, context);
        assertNotSame(decorated, codec);
        decorated.decode(buffer, resolver, builder);
        verify(codec, metadata, buffer, resolver, context);
    }
View Full Code Here

TOP

Related Classes of org.codehaus.preon.Codec

Copyright © 2018 www.massapicom. 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.