Package org.apache.tapestry.test

Examples of org.apache.tapestry.test.Creator


        verifyControls();
    }

    public void testRewindTrigger()
    {
        Creator creator = new Creator();
        ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class, new Object[]
        { "tag", "clicked" });

        IBinding binding = newBinding();
        submit.setBinding("selected", binding);
View Full Code Here


    public void testRewindTriggeredWithPointBound()
    {
        // Note: because there isn't a real Form to set the name, we'll do it here.

        Creator creator = new Creator();
        ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class, new Object[]
        { "tag", "clicked", "name", "fred" });

        IBinding binding = newBinding();
        submit.setBinding("selected", binding);
        submit.setBinding("point", binding);
View Full Code Here

    private Creator _creator;

    protected Creator getCreator()
    {
        if (_creator == null)
            _creator = new Creator();

        return _creator;
    }
View Full Code Here

        }
    }

    public void testContainedComponent()
    {
        Creator creator = new Creator();

        IContainedComponent cc = newContainedComponent();

        replayControls();

        IComponent component = (IComponent) creator.newInstance(BaseComponent.class);

        component.setContainedComponent(cc);

        assertSame(cc, component.getContainedComponent());
View Full Code Here

        verifyControls();
    }

    public void testContainedComponentConflict()
    {
        Creator creator = new Creator();

        IContainedComponent cc1 = newContainedComponent();
        IContainedComponent cc2 = newContainedComponent();

        IPage page = newPage("Fred");

        trainGetIdPath(page, null);

        replayControls();

        IComponent component = (IComponent) creator.newInstance(BaseComponent.class, new Object[]
        { "page", page, "container", page, "id", "barney" });

        component.setContainedComponent(cc1);

        try
View Full Code Here

    private Creator _creator;

    protected Creator getCreator()
    {
        if (_creator == null)
            _creator = new Creator();

        return _creator;
    }
View Full Code Here

        return buffer.toString();
    }

    public void testNotSerializable()
    {
        Creator creator = new Creator();
        Object object = new Object();

        DumpObject dumpObject = (DumpObject) creator.newInstance(DumpObject.class);

        assertEquals("java.io.NotSerializableException: java.lang.Object", dumpObject
                .convert(object));
    }
View Full Code Here

    public void testRewinding()
    {
        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycle(true);

        Creator creator = new Creator();
        DumpObject dumpObject = (DumpObject) creator.newInstance(DumpObject.class);

        replayControls();

        dumpObject.renderComponent(writer, cycle);
View Full Code Here

    public void testNormal() throws Exception
    {
        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycle(false);

        Creator creator = new Creator();
        DumpObject dumpObject = (DumpObject) creator.newInstance(DumpObject.class, new Object[]
        { "object", "a serialized string" });

        String expected = contentsOf("Normal.txt");

        writer.print(expected);
View Full Code Here

        return asset;
    }

    public void testPrerendered()
    {
        Creator creator = new Creator();
        ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class);

        MockControl formc = newControl(IForm.class);
        IForm form = (IForm) formc.getMock();
        MockControl cyclec = newControl(IRequestCycle.class);
        IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.test.Creator

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.