Package com.linkedin.data.template

Examples of com.linkedin.data.template.DoubleMap


    result = test("{\"key1\": 2.2, \"key2\": 3.3}", DoubleMap.class);
    final Map<String, Double> doubleFixture = new HashMap<String, Double>();
    doubleFixture.put("key1", 2.2D);
    doubleFixture.put("key2", 3.3D);
    Assert.assertEquals(result, new DoubleMap(doubleFixture));
    Assert.assertSame(result.getClass(), DoubleMap.class);

    result = test("{\"key1\": " + _bytes16Quoted + ", \"key2\": " + _bytes16Quoted + "}", BytesMap.class);
    final Map<String, ByteString> bytesFixture = new HashMap<String, ByteString>();
    bytesFixture.put("key1", ByteString.copyAvroString(_bytes16, true));
View Full Code Here


  public void testMapSchema()
  {
    TyperefTest record = new TyperefTest();
    RecordDataSchema recordDataSchema = record.schema();

    DoubleMap doubleMap = new DoubleMap();
    record.setDoubleRefMap(doubleMap);
    doubleMap = record.getDoubleRefMap();
    assertEquals(doubleMap.schema(), DataTemplateUtil.getSchema(DoubleMap.class));
    assertNotEquals(recordDataSchema.getField("doubleRefMap").getType(), doubleMap.schema());

    IntegerMap intMap = new IntegerMap();
    record.setIntMap(intMap);
    intMap = record.getIntMap();
    assertEquals(intMap.schema(), DataTemplateUtil.getSchema(IntegerMap.class));
View Full Code Here

TOP

Related Classes of com.linkedin.data.template.DoubleMap

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.