Package org.apache.torque.generator.control

Examples of org.apache.torque.generator.control.ControllerState


            options.setGlobalOption(optionWithSpecialChars);
        }

        UnitConfiguration unitConfiguration = new UnitConfiguration();
        unitConfiguration.setOptions(options);
        ControllerState controllerState = new ControllerState();
        controllerState.setUnitConfiguration(unitConfiguration);
        tokenReplacer = new TokenReplacer(controllerState);
    }
View Full Code Here


                    "propertiesData.properties");
        FileSource fileSource
                = new FileSource(
                        new PropertiesSourceFormat(),
                        propertiesFile,
                        new ControllerState());
        SourceElement rootElement
                = (SourceElement) fileSource.getRootElement();

        SourceElement copiedRootElement = rootElement.copy();
        if (!rootElement.graphEquals(copiedRootElement))
View Full Code Here

    private ControllerState controllerState;

    @Before
    public void setUp()
    {
        controllerState = new ControllerState();
        UnitConfiguration unitConfiguration = new UnitConfiguration();
        controllerState.setUnitConfiguration(unitConfiguration);
        Options options = new Options();
        unitConfiguration.setOptions(options);
    }
View Full Code Here

                null);
        FileSourceProvider fileSourceProvider
                = new FileSourceProvider(null, fileset, false);
        fileSourceProvider.init(
                new ConfigurationHandlers(),
                new ControllerState());

        // We read all sources and add the first property key to a hash set.
        // As all the source files only have one key equal to the base filename
        // we can make sure we have read the expected files correctly.
        Set<String> resultKeys = new HashSet<String>();
View Full Code Here

                null);
        FileSourceProvider fileSourceProvider
                = new FileSourceProvider(null, fileset, true);
        fileSourceProvider.init(
                new ConfigurationHandlers(),
                new ControllerState());

        // We read all sources and add the first property key to a hash set.
        // As all the source files only have one key equal to the base filename
        // we can make sure we have read the expected files correctly.
        Set<String> resultKeys = new HashSet<String>();
View Full Code Here

                null);
        FileSourceProvider fileSourceProvider
                = new FileSourceProvider(null, fileset, false);
        fileSourceProvider.init(
                new ConfigurationHandlers(),
                new ControllerState());
    }
View Full Code Here

    @Test
    public void testXmlOutlet() throws Exception
    {
        SourceElement rootElement = new SourceElement("root");
        rootElement.getChildren().add(new SourceElement("child"));
        ControllerState controllerState = new ControllerState();
        controllerState.setRootElement(rootElement);
        XmlOutlet xmlOutlet = new XmlOutlet(new QualifiedName("test"));
        OutletResult result = xmlOutlet.execute(controllerState);
        assertEquals(
                "<root>\n  <child/>\n</root>\n",
                result.getStringResult());
View Full Code Here

    @Test
    public void testXmlOutletCreateIdAttributes() throws Exception
    {
        SourceElement rootElement = new SourceElement("root");
        rootElement.getChildren().add(new SourceElement("child"));
        ControllerState controllerState = new ControllerState();
        controllerState.setRootElement(rootElement);
        XmlOutlet xmlOutlet = new XmlOutlet(new QualifiedName("test"));
        xmlOutlet.setCreateIdAttributes(true);
        OutletResult result = xmlOutlet.execute(controllerState);
        assertEquals(
                "<root id=\"1\">\n  <child id=\"2\"/>\n</root>\n",
View Full Code Here

    @Before
    public void setUp()
    {
        this.outlet = new ModifySourcenameOutlet(new QualifiedName(
                "org.apache.torque.generator.modifySourcenameOutlet"));
        controllerState = new ControllerState();
        controllerState.setSourceFile(
                new File("src/test/some-test-file-name.someTestExtension"));
    }
View Full Code Here

                new OutputAction("@param param1 description,of param1"));
        javadocOutlet.setMergepointMapping(
                new MergepointMapping(
                        "attributes",
                        mergepointActions));
        OutletResult result = javadocOutlet.execute(new ControllerState());
        assertTrue(result.isStringResult());
        assertEquals(
                    "    /**\n"
                  + "     * Test-body\n"
                  + "     * for.a,javadoc\n"
 
View Full Code Here

TOP

Related Classes of org.apache.torque.generator.control.ControllerState

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.