Package org.apache.avro.test

Examples of org.apache.avro.test.TestRecord


    Assert.assertNull(future2.getError());
  }
 
  @Test
  public void echo() throws Exception {
    TestRecord record = TestRecord.newBuilder().setHash(
        new org.apache.avro.test.MD5(
            new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8 })).
        setKind(org.apache.avro.test.Kind.FOO).
        setName("My Record").build();
   
View Full Code Here


    error.hashCode();
  }

  @Test
  public void testEcho() throws IOException {
    TestRecord record = new TestRecord();
    record.setName("foo");
    record.setKind(Kind.BAR);
    record.setHash(new MD5(new byte[]{0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5}));
    TestRecord echoed = proxy.echo(record);
    assertEquals(record, echoed);
    assertEquals(record.hashCode(), echoed.hashCode());
  }
View Full Code Here

TOP

Related Classes of org.apache.avro.test.TestRecord

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.