Examples of MD5


Examples of org.apache.avro.test.MD5

  public void testSpecificRecord() throws Exception {
    TestRecord s1 = new TestRecord();
    TestRecord s2 = new TestRecord();
    s1.name = new Utf8("foo");
    s1.kind = Kind.BAZ;
    s1.hash = new MD5();
    s1.hash.bytes(new byte[] {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5});
    s2.name = new Utf8("bar");
    s2.kind = Kind.BAR;
    s2.hash = new MD5();
    s2.hash.bytes(new byte[] {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,6});
    Schema schema = SpecificData.get().getSchema(TestRecord.class);

    check(schema, s1, s2, true, new SpecificDatumWriter(schema),
          SpecificData.get());
View Full Code Here

Examples of org.apache.avro.test.MD5

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

Examples of org.apache.avro.test.MD5

  public void testSpecificRecord() throws Exception {
    TestRecord s1 = new TestRecord();
    TestRecord s2 = new TestRecord();
    s1.name = new Utf8("foo");
    s1.kind = Kind.BAZ;
    s1.hash = new MD5();
    s1.hash.bytes(new byte[] {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5});
    s2.name = new Utf8("bar");
    s2.kind = Kind.BAR;
    s2.hash = new MD5();
    s2.hash.bytes(new byte[] {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,6});
    Schema schema = SpecificData.get().getSchema(TestRecord.class);

    check(schema, s1, s2, true, new SpecificDatumWriter<TestRecord>(schema),
          SpecificData.get());
View Full Code Here

Examples of org.apache.avro.test.Simple.MD5

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

Examples of org.apache.avro.test.util.MD5

  }

  @Test
  public void testEcho() throws IOException {
    TestRecord record = new TestRecord();
    record.hash = new MD5();
    System.arraycopy(new byte[]{0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5}, 0,
                     record.hash.bytes(), 0, 16);
    TestRecord echoed = proxy.echo(record);
    assertEquals(record, echoed);
    assertEquals(record.hashCode(), echoed.hashCode());
View Full Code Here

Examples of org.apache.avro.test.util.MD5

  }

  @Test
  public void testEcho() throws IOException {
    TestRecord record = new TestRecord();
    record.hash = new MD5();
    System.arraycopy(new byte[]{0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5}, 0,
                     record.hash.bytes(), 0, 16);
    TestRecord echoed = proxy.echo(record);
    assertEquals(record, echoed);
    assertEquals(record.hashCode(), echoed.hashCode());
View Full Code Here

Examples of org.apache.avro.test.util.MD5

  }

  @Test
  public void testEcho() throws IOException {
    TestRecord record = new TestRecord();
    record.hash = new MD5();
    System.arraycopy(new byte[]{0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5}, 0,
                     record.hash.bytes(), 0, 16);
    TestRecord echoed = proxy.echo(record);
    assertEquals(record, echoed);
    assertEquals(record.hashCode(), echoed.hashCode());
View Full Code Here

Examples of org.apache.avro.test.util.MD5

  }

  @Test
  public void testEcho() throws IOException {
    TestRecord record = new TestRecord();
    record.hash = new MD5();
    System.arraycopy(new byte[]{0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5}, 0,
                     record.hash.bytes(), 0, 16);
    TestRecord echoed = proxy.echo(record);
    assertEquals(record, echoed);
    assertEquals(record.hashCode(), echoed.hashCode());
View Full Code Here

Examples of org.apache.jackrabbit.vault.util.MD5

            relocate = true;
        }
    }

    public MD5 getMd5() {
        return new MD5(md5Msb, md5Lsb);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.util.MD5

        VltEntry e = entries.getEntry("foo.png");
        VltEntryInfo base = e.base();
        assertNotNull(base);
        base.setContentType("text/plain");
        base.setDate(1000);
        base.setMd5(new MD5(2,3));
        base.setSize(4);
        reopen();
        e = entries.getEntry("foo.png");
        base = e.base();
        assertEquals("text/plain", base.getContentType());
        assertEquals(1000, base.getDate());
        assertEquals(new MD5(2,3), base.getMd5());
        assertEquals(4, base.getSize());
    }
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.