Package speculoos.spi

Examples of speculoos.spi.Source


     * @throws MapperConfigurationException
     */
    public void test01BasicConfigure() throws MapperConfigurationException {
        /* configure */
        Mapper m = (Mapper) mockmapper.proxy();
        Source s = (Source) mocksrc.proxy();
        mockmapper.expects(atLeastOnce()).method("getName");
        configure.addMapper("map", m);
        configure.addSource("source", s);
        configure.link("map", "source");
        configure.setConfigured();
View Full Code Here


     * @throws MapperConfigurationException
     */
    public void test02Reset() throws MapperConfigurationException {
        /* configure */
        Mapper m = (Mapper) mockmapper.proxy();
        Source s = (Source) mocksrc.proxy();
        mockmapper.expects(atLeastOnce()).method("getName");
configure.addMapper("map", m);
        configure.addSource("source", s);
        configure.addParameter("toto", "toto");
        configure.link("map", "source");
View Full Code Here

        }
    }
   
    public void test22NoMapperLink() throws MapperConfigurationException {
        Mapper m = (Mapper) mockmapper.proxy();
        Source s = (Source) mocksrc.proxy();
        configure.addSource("source", s);
        try {
            configure.link("map", "source");
            fail("Should have thrown mapper exception");
        } catch (MapperConfigurationException e) {
View Full Code Here

//OK
            }
    }
    public void test23NoSourceLink() throws MapperConfigurationException {
        Mapper m = (Mapper) mockmapper.proxy();
        Source s = (Source) mocksrc.proxy();
        configure.addMapper("map", m);
        try {
            configure.link("map", "source");
            fail("Should have thrown mapper exception");
        } catch (MapperConfigurationException e) {
View Full Code Here

        Mapper mapper = (Mapper) mappers.get(name);
        if (mapper == null)
            throw new MapperConfigurationException("No mapper named " + name
                    + " in this manager");
        /* configure mapper through source */
        Source src = (Source) mapperToSource.get(mapper.getName());
        if (src == null)
            throw new MapperConfigurationException(
                    "No source is associated with mapper " + name);
        /* delegate preparation */
        Mapper niou = src.create(name, environment);
        return niou;
    }
View Full Code Here

     */
    public void release(Mapper mapper) throws MapperException {
        if (mapper == null)
            throw new IllegalArgumentException("Cannot release null mapper !");
        /* configure mapper through source */
        Source src = (Source) mapperToSource.get(mapper.getName());
        if (src == null)
            throw new MapperConfigurationException(
                    "No source is associated with mapper " + mapper);
        /* delegate release */
        src.release(mapper);
    }
View Full Code Here

            throws MapperConfigurationException {
        Mapper m = (Mapper) mappers.get(mapName);
        if (m == null)
            throw new MapperConfigurationException(mapName
                    + " is not the name of a mapper");
        Source src = (Source) sources.get(srcName);
        if (src == null)
            throw new MapperConfigurationException(srcName
                    + " is not the name of a source");
        /* link */
        mapperToSource.put(m.getName(), src);
View Full Code Here

TOP

Related Classes of speculoos.spi.Source

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.