Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.InjectSpecificationImpl


@Test
public class TestInjectMetaWorker extends BaseComponentTestCase
{
    private InjectSpecification newSpec(String propertyName, String object, Location location)
    {
        InjectSpecificationImpl result = new InjectSpecificationImpl();

        result.setProperty(propertyName);
        result.setObject(object);
        result.setLocation(location);

        return result;
    }
View Full Code Here


    public void testNoExistingProperty()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);

        EnhancementOperation op = newOp();

        trainGetPropertyType(op, "fred", null);
View Full Code Here

    public void testWithExistingProperty()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);

        EnhancementOperation op = newOp();

        trainGetPropertyType(op, "fred", boolean.class);
View Full Code Here

    public void testWithExistingPropertyWrongType()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);

        EnhancementOperation op = newOp();

        trainGetPropertyType(op, "fred", int.class);
View Full Code Here

        op.addMethod(Modifier.PUBLIC, sig, "return _script.getScript();", injectSpecLocation);

        replayControls();

        InjectSpecificationImpl is = new InjectSpecificationImpl();
        is.setProperty("foo");
        is.setObject("bar.script");
        is.setLocation(injectSpecLocation);

        InjectScriptWorker worker = new InjectScriptWorker();
        worker.setSource(source);

        worker.performEnhancement(op, is);
View Full Code Here

    }

    private InjectSpecification newInjectSpecification(String propertyName, String type,
            String object, Location location)
    {
        InjectSpecification result = new InjectSpecificationImpl();
        result.setProperty(propertyName);
        result.setType(type);
        result.setObject(object);
        result.setLocation(location);

        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.spec.InjectSpecificationImpl

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.