Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.InjectSpecification


        return spec;
    }

    public void testSuccess()
    {
        InjectSpecification spec = newSpec("fred", "barney", null);
        MockControl opc = newControl(EnhancementOperation.class);
        EnhancementOperation op = (EnhancementOperation) opc.getMock();

        ApplicationStateManager asm = newASM();
View Full Code Here


        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

                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

                        sig,
                        "return (org.apache.tapestry.html.BasePage)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

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

    public void testPrimitive()
    {
        InjectSpecification spec = newSpec("fooBar", "foo.bar");

        ComponentPropertySource source = newSource();

        MockControl control = newControl(EnhancementOperation.class);
        EnhancementOperation op = (EnhancementOperation) control.getMock();
View Full Code Here

        verifyControls();
    }

    public void testCharacter()
    {
        InjectSpecification spec = newSpec("fooBar", "foo.bar");

        ComponentPropertySource source = newSource();

        MockControl control = newControl(EnhancementOperation.class);
        EnhancementOperation op = (EnhancementOperation) control.getMock();
View Full Code Here

        verifyControls();
    }

    public void testObject()
    {
        InjectSpecification spec = newSpec("fooBar", "foo.bar");

        ComponentPropertySource source = newSource();
        ValueConverter converter = (ValueConverter) newMock(ValueConverter.class);

        MockControl control = newControl(EnhancementOperation.class);
View Full Code Here

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

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

        return is;
    }
View Full Code Here

    public void testNoExistingProperty()
    {
        Location l = newLocation();
        Object injectedValue = new Object();

        InjectSpecification spec = newSpec("fred", "service:barney", l);

        MockControl opc = newControl(EnhancementOperation.class);
        EnhancementOperation op = (EnhancementOperation) opc.getMock();

        MockControl pc = newControl(InjectedValueProvider.class);
View Full Code Here

    public void testWithExistingProperty()
    {
        Location l = newLocation();
        Object injectedValue = new HomeService();

        InjectSpecification spec = newSpec("wilma", "service:betty", l);

        MockControl opc = newControl(EnhancementOperation.class);
        EnhancementOperation op = (EnhancementOperation) opc.getMock();

        MockControl pc = newControl(InjectedValueProvider.class);
View Full Code Here

TOP

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

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.