Package org.springframework.social.config

Examples of org.springframework.social.config.FakeConnectionFactory


  @Test
  public void connectionFactoryLocator() throws Exception {
    assertTrue(context.containsBean("connectionFactoryLocator"));
    assertTrue(context.getBean("connectionFactoryLocator") instanceof ConnectionFactoryLocator);
    ConnectionFactoryLocator cfl = context.getBean(ConnectionFactoryLocator.class);   
    FakeConnectionFactory fakeConnectionFactory = (FakeConnectionFactory) cfl.getConnectionFactory(Fake.class);
    assertNotNull(fakeConnectionFactory);
    assertEquals("fakeAppId", fakeConnectionFactory.getAppId());   
    assertEquals("fakeAppSecret", fakeConnectionFactory.getAppSecret());
  }
View Full Code Here


  @Test
  public void connectionFactoryLocator() throws Exception {
    assertTrue(context.containsBean("connectionFactoryLocator"));
    assertTrue(context.getBean("connectionFactoryLocator") instanceof ConnectionFactoryLocator);
    ConnectionFactoryLocator cfl = context.getBean(ConnectionFactoryLocator.class);   
    FakeConnectionFactory fakeConnectionFactory = (FakeConnectionFactory) cfl.getConnectionFactory(Fake.class);
    assertNotNull(fakeConnectionFactory);
    assertEquals("fakeAppId", fakeConnectionFactory.getAppId());   
    assertEquals("fakeAppSecret", fakeConnectionFactory.getAppSecret());
  }
View Full Code Here

@PropertySource("classpath:/org/springframework/social/config/annotation/app.properties")
public class MyAwesomeSocialConfig extends SocialConfigurerAdapter {
  public void addConnectionFactories(ConnectionFactoryConfigurer config, Environment env) {
    String fakeAppId = env.getProperty("fake.appId");
    String fakeAppSecret = env.getProperty("fake.appSecret");
    config.addConnectionFactory(new FakeConnectionFactory(fakeAppId, fakeAppSecret));
  }
View Full Code Here

TOP

Related Classes of org.springframework.social.config.FakeConnectionFactory

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.