chore: refactoring some code to introduce a common base class for all api classes
This commit is contained in:
@@ -9,12 +9,12 @@ namespace Novaloop.PaymoApi.Tests
|
||||
{
|
||||
public static class DependencyFactory
|
||||
{
|
||||
public static PaymoApiClient GeneratePaymoApiClient()
|
||||
public static ApiClient GeneratePaymoApiClient()
|
||||
{
|
||||
return new PaymoApiClient(new HttpClient {BaseAddress = new Uri("https://app.paymoapp.com/")});
|
||||
return new ApiClient(new HttpClient {BaseAddress = new Uri("https://app.paymoapp.com/")});
|
||||
}
|
||||
|
||||
public static IOptions<PaymoApiOptions> GenerateOptions()
|
||||
public static IOptions<ApiOptions> GenerateOptions()
|
||||
{
|
||||
var paymoToken = new ConfigurationBuilder()
|
||||
.SetBasePath(AppContext.BaseDirectory)
|
||||
@@ -28,7 +28,7 @@ namespace Novaloop.PaymoApi.Tests
|
||||
throw new ArgumentException("Please set the environment variable 'PAYMOAPIINTEGRATIONTESTS__PAYMOTESTPROJECTTOKEN' with the token of your paymo test-project. Look inside Bitwarden if you work @ Novaloop.");
|
||||
}
|
||||
|
||||
return Options.Create(new PaymoApiOptions {ApiToken = paymoToken});
|
||||
return Options.Create(new ApiOptions {ApiToken = paymoToken});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user