use of org.craftercms.engine.util.spring.social.ConfigAwareConnectionFactoryLocator 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));
}
Aggregations