Package net.sf.joafip.store.service.conversion.def

Examples of net.sf.joafip.store.service.conversion.def.ConversionDefinitionIdStrReader


    final ConvertionDefinitionInputStream convertionDefinitionInputStream = new ConvertionDefinitionInputStream(
        data);
    final InputStreamAndSource convertionDefinitionInputStreamAndSource =
    /**/new InputStreamAndSource(convertionDefinitionInputStream, "");
    final ConversionDefinitionIdStrReader convertionDefinitionReader =
    /**/new ConversionDefinitionIdStrReader(
        convertionDefinitionInputStreamAndSource, classInfoFactory);
    ConversionDefEntry def;

    def = convertionDefinitionReader.read();
    assertDefOk(def);
    def = convertionDefinitionReader.read();
    assertDefOk(def);
    def = convertionDefinitionReader.read();
    assertDefOk(def);
    def = convertionDefinitionReader.read();
    assertDefOk(def);
    def = convertionDefinitionReader.read();
    assertNull("must not have more definition", def);
    convertionDefinitionReader.close();
  }
View Full Code Here


        /**/"0.0.1;net.sf.joafip.b#java.lang.Integer:net.sf.joafip.AbstractB#b\n" };
    final ConvertionDefinitionInputStream convertionDefinitionInputStream = new ConvertionDefinitionInputStream(
        data);
    final InputStreamAndSource convertionDefinitionInputStreamAndSource =
    /**/new InputStreamAndSource(convertionDefinitionInputStream, "");
    final ConversionDefinitionIdStrReader convertionDefinitionReader =
    /**/new ConversionDefinitionIdStrReader(
        convertionDefinitionInputStreamAndSource, classInfoFactory);

    ConversionDefEntry def;

    def = convertionDefinitionReader.read();
    assertNotNull("must have definition", def);
    // old identifier
    assertEquals("bad old identifier", Version.releaseId("0.0.0"),
        def.getIdentifier());
    // new identifier
    assertEquals("bad new identifier", Version.releaseId("0.0.1"),
        def.getToIdentifier());
    // original class name
    assertEquals("bad original class name", "net.sf.joafip.a", def
        .getClassInfo().getName());
    // replacement class name
    assertEquals("bad replacement class name", "net.sf.joafip.b", def
        .getReplacementClass().getName());
    // original declaring class
    assertEquals("bad original declaring class", "net.sf.joafip.AbstractA",
        def.getOriginalFieldInfo().getDeclaringClassName());
    // replacement declaring class
    assertEquals("bad replacement declaring class",
        "net.sf.joafip.AbstractB", def.getReplacementFieldInfo()
            .getDeclaringClassName());
    // original field type
    assertEquals("bad original field type", "java.lang.Integer", def
        .getOriginalFieldInfo().getFieldTypeName());
    // replacement field type
    assertEquals("bad replacement field type", "java.lang.Integer", def
        .getReplacementFieldInfo().getFieldTypeName());
    // original field name
    assertEquals("bad original field name", "a", def.getOriginalFieldInfo()
        .getFieldName());
    // replacement field name
    assertEquals("bad replacement field name", "b", def
        .getReplacementFieldInfo().getFieldName());
    // only one definition
    def = convertionDefinitionReader.read();
    assertNull("must not have more definition", def);
    convertionDefinitionReader.close();
  }
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.service.conversion.def.ConversionDefinitionIdStrReader

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.