Package javax.jdo.metadata

Examples of javax.jdo.metadata.TypeMetadata


    /** test getMetadata with concrete class name*/
    public void testConcreteClassName() {
        pm = getPM();
        String className = "org.apache.jdo.tck.pc.company.PartTimeEmployee";
        TypeMetadata metadata = pmf.getMetadata(className);
        assertNotNull(ASSERTION_FAILED
                + "metadata must not be null for abstract class " + className, metadata);
        Metadata parent = metadata.getParent();
        assertNotNull(ASSERTION_FAILED
                + "parent metadata must not be null for concrete class " + className, parent);
        String name = metadata.getName();
        String packageName = ((PackageMetadata)parent).getName();
        assertEquals(ASSERTION_FAILED
                + "metadata name and class name must match.", className, packageName + "." + name);
    }
View Full Code Here


    /** test getMetadata with abstract class name*/
    public void testAbstractClassName() {
        pm = getPM();
        String className = "org.apache.jdo.tck.pc.company.Employee";
        TypeMetadata metadata = pmf.getMetadata(className);
        assertNotNull(ASSERTION_FAILED
                + "metadata must not be null for abstract class " + className, metadata);
        Metadata parent = metadata.getParent();
        assertNotNull(ASSERTION_FAILED
                + "parent metadata must not be null for abstract class " + className, parent);
        String name = metadata.getName();
        String packageName = ((PackageMetadata)parent).getName();
        assertEquals(ASSERTION_FAILED
                + "metadata name and class name must match.", className, packageName + "." + name);
    }
View Full Code Here

    /** test getMetadata with invalid class name*/
    public void testInvalidName() {
        pm = getPM();
        String className = "org.apache.jdo.tck.pc.company.Bogus";
        TypeMetadata metadata = pmf.getMetadata(className);
        assertNull(ASSERTION_FAILED
                + "metadata should return null if unknown parameter", metadata);
    }
View Full Code Here

TOP

Related Classes of javax.jdo.metadata.TypeMetadata

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.