Examples of ILibrarySpecification


Examples of org.apache.tapestry.spec.ILibrarySpecification

     * @since 3.0
     */

    public void testConfigureValue() throws Exception
    {
        ILibrarySpecification spec = parseLib("ConfigureValue.library");

        checkLine(spec, 22);
        checkLine(spec.getExtensionSpecification("bedrock"), 24);

        Bedrock bedrock = (Bedrock) spec.getExtension("bedrock", Bedrock.class);

        assertEquals("flintstone", bedrock.getFred());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.ILibrarySpecification

    /** @since 3.1 */

    public void testLibraryDescription() throws Exception
    {
        ILibrarySpecification ls = parseLib("LibraryDescription.library");

        assertEquals("Often, these are just placeholders.", ls.getDescription());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.ILibrarySpecification

    }

    /** @since 3.1 */
    public void testMeta() throws Exception
    {
        ILibrarySpecification spec = parseLib("Meta.library");

        assertEquals("bar", spec.getProperty("foo"));
        assertEquals("long value", spec.getProperty("long"));
    }
View Full Code Here

Examples of org.apache.tapestry.spec.ILibrarySpecification

        // following little kludge:

        if (location.getResourceURL() == null && path.startsWith("/"))
            location = new ClasspathResourceLocation(_specification.getResourceResolver(), path);

        ILibrarySpecification ls = _specificationSource.getLibrarySpecification(location);

        return new Namespace(id, this, ls, _specificationSource);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.ILibrarySpecification

        if (_libraryDigester == null)
            _libraryDigester = constructLibraryDigester();

        try
        {
            ILibrarySpecification result =
                (ILibrarySpecification) parse(_libraryDigester, resourceLocation);

            result.setResourceResolver(_resolver);
            result.setSpecificationLocation(resourceLocation);
            result.instantiateImmediateExtensions();

            return result;
        }
        catch (DocumentParseException ex)
        {
View Full Code Here

Examples of org.apache.tapestry.spec.ILibrarySpecification

     * @since 2.2
     */

    public void testValidLibrary() throws Exception
    {
        ILibrarySpecification spec = parseLib("ValidLibrary.library");

        checkLine(spec, 24);

        checkList("pageNames", new String[]
        { "FirstPage", "SecondPage" }, spec.getPageNames());

        checkList("componentAliases", new String[]
        { "FirstComponent", "SecondComponent" }, spec.getComponentTypes());

        checkList("libraryIds", new String[]
        { "lib1", "lib2" }, spec.getLibraryIds());

        assertNotNull(spec.getSpecificationLocation());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.ILibrarySpecification

     * @since 3.0
     */

    public void testConfigureValue() throws Exception
    {
        ILibrarySpecification spec = parseLib("ConfigureValue.library");

        checkLine(spec, 22);
        checkLine(spec.getExtensionSpecification("bedrock"), 24);

        Bedrock bedrock = (Bedrock) spec.getExtension("bedrock", Bedrock.class);

        assertEquals("flintstone", bedrock.getFred());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.ILibrarySpecification

    /** @since 4.0 */

    public void testLibraryDescription() throws Exception
    {
        ILibrarySpecification ls = parseLib("LibraryDescription.library");

        assertEquals("Often, these are just placeholders.", ls.getDescription());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.ILibrarySpecification

    }

    /** @since 4.0 */
    public void testMeta() throws Exception
    {
        ILibrarySpecification spec = parseLib("Meta.library");

        assertEquals("bar", spec.getProperty("foo"));
        assertEquals("long value", spec.getProperty("long"));
    }
View Full Code Here

Examples of org.apache.tapestry.spec.ILibrarySpecification

     * @since 2.2
     */

    public void testValidLibrary() throws Exception
    {
        ILibrarySpecification spec = parseLib("ValidLibrary.library");

        checkLine(spec, 24);

        checkList("pageNames", new String[]
        { "FirstPage", "SecondPage" }, spec.getPageNames());

        checkList("componentAliases", new String[]
        { "FirstComponent", "SecondComponent" }, spec.getComponentTypes());

        checkList("libraryIds", new String[]
        { "lib1", "lib2" }, spec.getLibraryIds());

        assertNotNull(spec.getSpecificationLocation());
    }
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.