Package com.linkedin.data.codec

Examples of com.linkedin.data.codec.PsonDataCodec$PsonParser


  public void testPsonDataCodec() throws IOException
  {
    int[] bufferSizesToTest = { 17, 19, 23, 29, 31, 37, 41, 43, 47, 0 };
    Boolean[] booleanValues = new Boolean[] { Boolean.TRUE, Boolean.FALSE };

    PsonDataCodec codec = new PsonDataCodec(true);

    PsonDataCodec.Options lastOption = null;
    for (int bufferSize : bufferSizesToTest)
    {
      for (boolean encodeCollectionCount : booleanValues)
      {
        for (boolean encodeStringLength : booleanValues)
        {
          PsonDataCodec.Options option = new PsonDataCodec.Options();
          option.setEncodeCollectionCount(encodeCollectionCount).setEncodeStringLength(encodeStringLength);
          if (bufferSize != 0)
          {
            option.setBufferSize(bufferSize);
          }

          codec.setOptions(option);
          testDataCodec(codec);

          if (lastOption != null)
          {
            assertFalse(option.equals(lastOption));
View Full Code Here


  }

  @Test
  public void testPsonCodecNumbers() throws IOException
  {
    PsonDataCodec codec = new PsonDataCodec();
    testCodecNumbers(codec);
  }
View Full Code Here

  @Test
  public void run() throws IOException
  {
    DataCodec codecs[] = {
      new JacksonDataCodec(),
      new PsonDataCodec().setOptions(new PsonDataCodec.Options().setEncodeCollectionCount(false).setEncodeStringLength(false)),
      new PsonDataCodec().setOptions(new PsonDataCodec.Options().setEncodeCollectionCount(false).setEncodeStringLength(true)),
      new PsonDataCodec().setOptions(new PsonDataCodec.Options().setEncodeCollectionCount(true).setEncodeStringLength(false)),
      new PsonDataCodec().setOptions(new PsonDataCodec.Options().setEncodeCollectionCount(true).setEncodeStringLength(true)),
    };

    if (_testOnly == false)
    {
      out.println("Number of elements " + _numElements);
View Full Code Here

TOP

Related Classes of com.linkedin.data.codec.PsonDataCodec$PsonParser

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.