Package org.apache.torque.generator.qname

Examples of org.apache.torque.generator.qname.QualifiedName


    public void testConstructorWithSameOutletName()
            throws ConfigurationException
    {
        List<Outlet> outlets = new ArrayList<Outlet>();
        outlets.add(new JavaOutlet(
                new QualifiedName("sameName")));
        outlets.add(new PackageToPathOutlet(
                new QualifiedName("sameName")));
        List<MergepointMapping> mergepointMappings
                = new ArrayList<MergepointMapping>();

        new OutletConfiguration(outlets, mergepointMappings, unitDescriptor);
    }


    @Test
    public void testResolveMergepointMappings() throws ConfigurationException
    {
        List<Outlet> outlets = new ArrayList<Outlet>();
        outlets.add(new JavaOutlet(
                new QualifiedName("test.outlet")));
        outlets.add(new PackageToPathOutlet(
                new QualifiedName("test.outlet.2")));
        List<MergepointMapping> mergepointMappings
                = new ArrayList<MergepointMapping>();
        mergepointMappings.add(
                new MergepointMapping("test.outlet.testMergepoint"));
        mergepointMappings.get(0).addAction(
                new ApplyAction(".", "test.outlet.2", false));

        OutletConfiguration outletConfiguration = new OutletConfiguration(
                outlets,
                mergepointMappings,
                unitDescriptor);
        outletConfiguration.resolveMergepointMappings();

        Outlet outlet = outletConfiguration.getOutlet(
                new QualifiedName("test.outlet"));
        assertEquals(1, outlet.getMergepointMappings().size());
        assertEquals(
                1,
                outlet.getMergepointMapping("testMergepoint")
                    .getActions().size());

    public void testResolveMergepointMappingsNotExistingOutlet()
            throws ConfigurationException
    {
        List<Outlet> outlets = new ArrayList<Outlet>();
        outlets.add(new JavaOutlet(
                new QualifiedName("test.outlet")));
        List<MergepointMapping> mergepointMappings
                = new ArrayList<MergepointMapping>();
        mergepointMappings.add(
                new MergepointMapping("not.existing.outlet.testMergepoint"));

    public void testResolveMergepointMappingsNoNamespace()
            throws ConfigurationException
    {
        List<Outlet> outlets = new ArrayList<Outlet>();
        outlets.add(new JavaOutlet(
                new QualifiedName("test.outlet")));
        List<MergepointMapping> mergepointMappings
                = new ArrayList<MergepointMapping>();
        mergepointMappings.add(
                new MergepointMapping("testMergepoint"));

                        + OUTLET_NAME_ATTRIBUTE
                        + " must be set on the element "
                        + rawName
                        + " for Groovy Outlets");
            }
            outletName = new QualifiedName(nameAttribute);
        }

        String path = attributes.getValue(OUTLET_PATH_ATTRIBUTE);

        try

TOP

Related Classes of org.apache.torque.generator.qname.QualifiedName

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.