Examples of InjectSpecificationImpl


Examples of org.apache.tapestry.spec.InjectSpecificationImpl

    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

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

    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

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

    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

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

        return newMock(ApplicationStateManager.class);
    }

    private InjectSpecification newSpec(String propertyName, String objectName, Location l)
    {
        InjectSpecification spec = new InjectSpecificationImpl();

        spec.setProperty(propertyName);
        spec.setObject(objectName);
        spec.setLocation(l);

        return spec;
    }
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

        verify();
    }

    private InjectSpecification newSpec(Location l)
    {
        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("somePage");
        is.setObject("SomePage");
        is.setLocation(l);

        return is;
    }
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

*/
public class TestInjectWorker extends HiveMindTestCase
{
    private List createInjectSpec(String name, String locator, Location location)
    {
        InjectSpecification is = new InjectSpecificationImpl();

        is.setProperty(name);
        is.setObjectReference(locator);
        is.setLocation(location);

        return Collections.singletonList(is);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

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

        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

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

        return (ApplicationStateManager) newMock(ApplicationStateManager.class);
    }

    private InjectSpecification newSpec(String propertyName, String objectName, Location l)
    {
        InjectSpecification spec = new InjectSpecificationImpl();

        spec.setProperty(propertyName);
        spec.setObject(objectName);
        spec.setLocation(l);

        return spec;
    }
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

        op.getPropertyType("somePage");
        opc.setReturnValue(int.class);

        replayControls();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("somePage");
        is.setObject("SomePage");
        is.setLocation(l);

        try
        {
            new InjectPageWorker().performEnhancement(op, is);
            unreachable();
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

                sig,
                "return getPage().getRequestCycle().getPage(\"SomePage\");");

        replayControls();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("somePage");
        is.setObject("SomePage");

        new InjectPageWorker().performEnhancement(op, is);

        verifyControls();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.