示例#1
0
 public FlickrApiTests()
 {
     ISimplickrFormatter simplickrFormatter = new SimplickrJsonFormatter();
     IHttpClient httpClient = new HttpClient();
     ISimplickrConfigurationProvider simplickrConfigurationProvider = new SimplickrConfigurationProvider();
     IFlickrRequestUrlProvider flickrRequestUrlProvider = new FlickrRequestUrlProvider(simplickrFormatter, simplickrConfigurationProvider);
     IFlickrApiInvoker flickrApiInvoker = new FlickrApiInvoker(flickrRequestUrlProvider, httpClient, simplickrFormatter);
     _flickrApi = new FlickrApi(flickrApiInvoker);
 }
示例#2
0
        public OAuthController()
        {
            _oAuthUrlService = new OAuthUrlService(new SimplickrConfigurationProvider());
            IHttpClient httpClient = new HttpClient();
            _oAuthService = new OAuthService(_oAuthUrlService, httpClient, new QueryStringSerializer());

            ISimplickrFormatter simplickrFormatter = new SimplickrJsonFormatter();
            ISimplickrConfigurationProvider simplickrConfigurationProvider = new SimplickrConfigurationProvider();
            var flickrRequestBuilder = new FlickrRequestUrlProvider(simplickrFormatter, simplickrConfigurationProvider);
            _flickrApi = new FlickrApi(new FlickrApiInvoker(flickrRequestBuilder, httpClient, simplickrFormatter));
        }
        public OAuthServiceTests()
        {
            _oAuthUrlService = new OAuthUrlService(new SimplickrConfigurationProvider());
            _oAuthService = new OAuthService(_oAuthUrlService, new HttpClient(), new QueryStringSerializer());

            _callbackUrl = "http://portfotolio.local/-oauth/authorize";

            ISimplickrFormatter simplickrFormatter = new SimplickrJsonFormatter();
            ISimplickrConfigurationProvider simplickrConfigurationProvider = new SimplickrConfigurationProvider();
            var flickrRequestBuilder = new FlickrRequestUrlProvider(simplickrFormatter, simplickrConfigurationProvider);
            IHttpClient httpClient = new HttpClient();
            _flickrApi = new FlickrApi(new FlickrApiInvoker(flickrRequestBuilder, httpClient, simplickrFormatter));
        }