public AuthTests() { RestClient = new RestClientStub(); Connection = new IS24Connection { RestClientFactory = baseUrl => { RestClient.BaseUrl = new Uri(baseUrl); return(RestClient); }, BaseUrlPrefix = @"https://rest.sandbox-immobilienscout24.de/restapi/api", ConsumerKey = "ConsumerKey", ConsumerSecret = "ConsumerSecret" }; }
public TestBase(string baseUrlPrefix, Func <IIS24Connection, T> createClient) { RestClient = new RestClientStub(); var connection = new IS24Connection { RestClientFactory = baseUrl => { RestClient.BaseUrl = new Uri(baseUrl); return(RestClient); }, BaseUrlPrefix = baseUrlPrefix, AccessToken = "AccessToken", AccessTokenSecret = "AccessTokenSecret", ConsumerKey = "ConsumerKey", ConsumerSecret = "ConsumerSecret" }; Client = createClient(connection); }