Package org.jasig.portal.rendering

Examples of org.jasig.portal.rendering.StAXPipelineComponent


        final CacheKey cacheKey = CacheKey.build("testCacheKey");
        final List<XMLEvent> eventBuffer = Collections.emptyList();
        final PipelineEventReader<XMLEventReader, XMLEvent> eventReader = new PipelineEventReaderImpl<XMLEventReader, XMLEvent>(new XMLEventBufferReader(eventBuffer.listIterator()));
       
        final Ehcache cache = createMock(Ehcache.class);
        final StAXPipelineComponent targetComponent = createMock(StAXPipelineComponent.class);
        final ResourcesElementsProvider elementsProvider = createMock(ResourcesElementsProvider.class);
       
        expect(elementsProvider.getDefaultIncludedType()).andReturn(Included.AGGREGATED);
        expect(targetComponent.getCacheKey(mockReq, mockRes)).andReturn(cacheKey);
        expect(cache.get(cacheKey)).andReturn(null);
        expect(targetComponent.getEventReader(mockReq, mockRes)).andReturn(eventReader);
        cache.put((Element)notNull());
        expectLastCall();
       
        replay(cache, targetComponent, elementsProvider);
       
View Full Code Here


        final CacheKey cacheKey = CacheKey.build("testCacheKey");
        final CachedEventReader<XMLEvent> eventReader = new CachedEventReader<XMLEvent>(Collections.EMPTY_LIST, Collections.EMPTY_MAP);
        final Element cacheElement = new Element(cacheKey, eventReader);
       
        final Ehcache cache = createMock(Ehcache.class);
        final StAXPipelineComponent targetComponent = createMock(StAXPipelineComponent.class);
        final ResourcesElementsProvider elementsProvider = createMock(ResourcesElementsProvider.class);
       
        expect(elementsProvider.getDefaultIncludedType()).andReturn(Included.AGGREGATED);
        expect(targetComponent.getCacheKey(mockReq, mockRes)).andReturn(cacheKey);
        expect(cache.get(cacheKey)).andReturn(cacheElement);
       
        replay(cache, targetComponent, elementsProvider);
       
        final CachingStAXPipelineComponent cachingComponent = new CachingStAXPipelineComponent();
View Full Code Here

        final XMLEventReader xmlEventReader = this.getXmlEventReader("juser.xml");
        final PipelineEventReaderImpl<XMLEventReader, XMLEvent> cacheableEventReader = new PipelineEventReaderImpl<XMLEventReader, XMLEvent>(xmlEventReader);
       
        final Transformer transformer = this.getTransformer("columns.xsl");

        final StAXPipelineComponent targetComponent = EasyMock.createMock(StAXPipelineComponent.class);
        final TransformerSource transformerSource = EasyMock.createMock(TransformerSource.class);
       
        EasyMock.expect(targetComponent.getEventReader(mockReq, mockRes)).andReturn(cacheableEventReader);
        EasyMock.expect(transformerSource.getTransformer(mockReq, mockRes)).andReturn(transformer);
       
        EasyMock.replay(targetComponent, transformerSource);
       
        final XSLTComponent xsltComponent = new XSLTComponent();
View Full Code Here

TOP

Related Classes of org.jasig.portal.rendering.StAXPipelineComponent

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.