Search in sources :

Example 1 with FacebookConnectionFactoryConfigParser

use of org.craftercms.engine.util.config.impl.FacebookConnectionFactoryConfigParser in project engine by craftercms.

the class ConfigAwareConnectionFactoryLocatorTest method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    CacheTemplateMockUtils.setUpWithNoCaching(cacheTemplate);
    ConfigurationParser<?> configParserStub = new FacebookConnectionFactoryConfigParser() {

        @Override
        protected ConnectionFactory<Facebook> createFacebookConnectionFactory(String appId, String appSecret) {
            return new FacebookConnectionFactoryStub(appId, appSecret);
        }
    };
    locator = new ConfigAwareConnectionFactoryLocator();
    locator.setCacheTemplate(cacheTemplate);
    locator.setDefaultLocator(new ConnectionFactoryRegistry());
    locator.setConfigParsers(Arrays.<ConfigurationParser<?>>asList(configParserStub));
}
Also used : ConfigAwareConnectionFactoryLocator(org.craftercms.engine.util.spring.social.ConfigAwareConnectionFactoryLocator) FacebookConnectionFactoryConfigParser(org.craftercms.engine.util.config.impl.FacebookConnectionFactoryConfigParser) Facebook(org.springframework.social.facebook.api.Facebook) ConnectionFactoryRegistry(org.springframework.social.connect.support.ConnectionFactoryRegistry) Before(org.junit.Before)

Aggregations

FacebookConnectionFactoryConfigParser (org.craftercms.engine.util.config.impl.FacebookConnectionFactoryConfigParser)1 ConfigAwareConnectionFactoryLocator (org.craftercms.engine.util.spring.social.ConfigAwareConnectionFactoryLocator)1 Before (org.junit.Before)1 ConnectionFactoryRegistry (org.springframework.social.connect.support.ConnectionFactoryRegistry)1 Facebook (org.springframework.social.facebook.api.Facebook)1