Package com.tangosol.io.pof

Examples of com.tangosol.io.pof.ConfigurablePofContext


        Assert.assertEquals(TimeUnit.MILLISECONDS, extracter.extractFromBinary(ctx, blob));       
    }

    @Test
    public void testTypeC_TU_null() {
        ConfigurablePofContext ctx = new ConfigurablePofContext(XmlHelper.loadXml(getClass().getResource("/test-pof-config.xml")));
       
        TypeB b = new TypeB();
        b.tu = null;
        TypeC c = new TypeC();
        c.b = b;
View Full Code Here


        Assert.assertEquals(null, extracter.extractFromBinary(ctx, blob));       
    }

    @Test
    public void testTypeC_StringArray() {
        ConfigurablePofContext ctx = new ConfigurablePofContext(XmlHelper.loadXml(getClass().getResource("/test-pof-config.xml")));
       
        TypeB b = new TypeB();
        b.stringArray = new String[]{"A","B","C"};
        TypeC c = new TypeC();
        c.b = b;
View Full Code Here

        Assert.assertEquals(3, extracter.extractFromBinary(ctx, blob));       
    }

    @Test
    public void testTypeC_StringArray_null() {
        ConfigurablePofContext ctx = new ConfigurablePofContext(XmlHelper.loadXml(getClass().getResource("/test-pof-config.xml")));
       
        TypeB b = new TypeB();
        b.stringArray = null;
        TypeC c = new TypeC();
        c.b = b;
View Full Code Here

        Assert.assertEquals(null, extracter.extractFromBinary(ctx, blob));       
    }

    @Test
    public void testTypeC_IntArray() {
        ConfigurablePofContext ctx = new ConfigurablePofContext(XmlHelper.loadXml(getClass().getResource("/test-pof-config.xml")));
       
        int[] array = {1, 2, 3};
        TypeB b = new TypeB();
        b.intArray = array;
        TypeC c = new TypeC();
View Full Code Here

        Assert.assertEquals(3, extracter.extractFromBinary(ctx, blob));       
    }

    @Test
    public void testTypeC_IntArray_null() {
        ConfigurablePofContext ctx = new ConfigurablePofContext(XmlHelper.loadXml(getClass().getResource("/test-pof-config.xml")));
       
        TypeB b = new TypeB();
        b.intArray = null;
        TypeC c = new TypeC();
        c.b = b;
View Full Code Here

 
  private ReflectionPofSerializer autoSerializer = new ReflectionPofSerializer();
  private int minAutoId = MIN_AUTO_ID;
 
  public AutoPofSerializer() {
    context = new ConfigurablePofContext();
//    initTypeMap();
    initContextMap();
    initCustomPredefines();
  }
View Full Code Here

    initContextMap();
    initCustomPredefines();
  }
 
  public AutoPofSerializer(String pofConfig) {
    context = new ConfigurablePofContext(pofConfig);
//    initTypeMap();
    initContextMap();
    initCustomPredefines();
  }
View Full Code Here

    initContextMap();
    initCustomPredefines();
  }

  public AutoPofSerializer(String pofConfig, NamedCache typeMap) {
    this.context = new ConfigurablePofContext(pofConfig);
    this.typeMap = typeMap;
    initContextMap();
    initCustomPredefines();
  }
View Full Code Here

*/
public class PofExtractorTest {

    @Test
    public void testTypeA() {
        ConfigurablePofContext ctx = new ConfigurablePofContext(XmlHelper.loadXml(getClass().getResource("/test-pof-config.xml")));
       
        Binary blob = ExternalizableHelper.toBinary(new TypeA(), ctx);
        PofValue root = PofValueParser.parse(blob, ctx);
   
        Assert.assertTrue(root instanceof ComplexPofValue);
View Full Code Here

        Assert.assertEquals(3, helper.extract(t));
    }
   
    @Test
    public void testTypeB_String() {
        ConfigurablePofContext ctx = new ConfigurablePofContext(XmlHelper.loadXml(getClass().getResource("/test-pof-config.xml")));
       
        TypeB b = new TypeB();
        b.string = "ABC";
       
        Binary blob = ExternalizableHelper.toBinary(b, ctx);
View Full Code Here

TOP

Related Classes of com.tangosol.io.pof.ConfigurablePofContext

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.