Package org.apache.tapestry.engine

Examples of org.apache.tapestry.engine.ISpecificationSource


    public void testFindChildLibrarySpecification()
    {
        Resource parent = newResource();
        Resource child = newResource();
        ISpecificationSource source = newSource();
        ILibrarySpecification spec = newLSpec();
        AssetSource assetSource = newAssetSource();
        Location l = newLocation();

        trainResolveChildResource(assetSource, parent, "foo/bar.library", l, child);
View Full Code Here


    public void testGetPageSpecification()
    {
        Resource libraryResource = newResource();
        Resource specResource = newResource();
        IComponentSpecification spec = newComponentSpec();
        ISpecificationSource source = newSource();
        AssetSource assetSource = newAssetSource();
        Location l = newLocation();

        trainResolveChildResource(assetSource, libraryResource, "Foo.page", l, specResource);

        expect(source.getPageSpecification(specResource)).andReturn(spec);

        replay();

        NamespaceResources nr = new NamespaceResourcesImpl(source, assetSource);
View Full Code Here

    public void testGetComponentSpecification()
    {
        Resource libraryResource = newResource();
        Resource specResource = newResource();
        IComponentSpecification spec = newComponentSpec();
        ISpecificationSource source = newSource();
        AssetSource assetSource = newAssetSource();
        Location l = newLocation();

        trainResolveChildResource(assetSource, libraryResource, "Foo.jwc", l, specResource);

        expect(source.getComponentSpecification(specResource)).andReturn(spec);

        replay();

        NamespaceResources nr = new NamespaceResourcesImpl(source, assetSource);
View Full Code Here

        expect(spec.isDeprecated()).andReturn(isDeprecated);
    }

    protected ISpecificationSource newSource(Resource resource, IComponentSpecification spec)
    {
        ISpecificationSource source = newMock(ISpecificationSource.class);

        expect(source.getComponentSpecification(resource)).andReturn(spec);

        return source;
    }
View Full Code Here

        return source;
    }

    protected ISpecificationSource newSource(INamespace framework)
    {
        ISpecificationSource source = newMock(ISpecificationSource.class);

        expect(source.getFrameworkNamespace()).andReturn(framework);

        return source;
    }
View Full Code Here

        expect(namespace.getSpecificationLocation()).andReturn(namespaceLocation);

        train(log, ResolverMessages.checkingResource(specLocation));
       
        ISpecificationSource source = newSource(specLocation, spec);
       
        train(log, ResolverMessages.installingComponent("MyComponent", namespace, spec));

        namespace.installComponentSpecification("MyComponent", spec);
View Full Code Here

       
        trainGetPackages(namespace, "org.foo");
       
        ClassFinder finder = newClassFinder("org.foo", "FrameworkComponent", null);
       
        ISpecificationSource source = newSource(framework);

        expect(framework.containsComponentType("FrameworkComponent")).andReturn(true);

        expect(framework.getComponentSpecification("FrameworkComponent")).andReturn(spec);
       
View Full Code Here

        train(log, ResolverMessages.checkingResource(namespaceLocation
                .getRelativeResource("NotFoundComponent.jwc")));

        expect(namespace.isApplicationNamespace()).andReturn(false);

        ISpecificationSource source = newSource(framework);

        expect(framework.containsComponentType("NotFoundComponent")).andReturn(false);

        ClassFinder finder = newClassFinder("org.foo", "NotFoundComponent", null);
        trainGetPackages(namespace, "org.foo");
View Full Code Here

       
        expect(namespace.isApplicationNamespace()).andReturn(true);

        train(log, ResolverMessages.checkingResource(specLocation));
       
        ISpecificationSource source = newSource(specLocation, spec);
       
        train(log, ResolverMessages.installingComponent("MyAppComponent", namespace, spec));
       
        namespace.installComponentSpecification("MyAppComponent", spec);
View Full Code Here

        train(log, ResolverMessages.checkingResource(contextRoot
                .getRelativeResource("WEB-INF/myapp/MyWebInfComponent.jwc")));
        train(log, ResolverMessages.checkingResource(specLocation));
       
        ISpecificationSource source = newSource(specLocation, spec);
       
        train(log, ResolverMessages.installingComponent("MyWebInfComponent", namespace, spec));

        namespace.installComponentSpecification("MyWebInfComponent", spec);
       
View Full Code Here

TOP

Related Classes of org.apache.tapestry.engine.ISpecificationSource

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.