Package org.apache.thrift.protocol

Source Code of org.apache.thrift.protocol.TestTTupleProtocol

package org.apache.thrift.protocol;

import org.apache.thrift.TDeserializer;
import org.apache.thrift.TSerializer;

import thrift.test.TupleProtocolTestStruct;


public class TestTTupleProtocol extends ProtocolTestBase {

  @Override
  protected boolean canBeUsedNaked() {
    return false;
  }

  @Override
  protected TProtocolFactory getFactory() {
    return new TTupleProtocol.Factory();
  }

  public void testBitsetLengthIssue() throws Exception {
    final TupleProtocolTestStruct t1 = new TupleProtocolTestStruct();
    t1.setField1(0);
    t1.setField2(12);
    new TDeserializer(new TTupleProtocol.Factory()).deserialize(new TupleProtocolTestStruct(), new TSerializer(new TTupleProtocol.Factory()).serialize(t1));
  }
}
TOP

Related Classes of org.apache.thrift.protocol.TestTTupleProtocol

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.