public static TestSdkConfiguration GetApplicationConfiguration(string outputPath) { var configuration = new TestSdkConfiguration(); var iConfig = GetIConfigurationRoot(outputPath); iConfig.GetSection("testSdkConfiguration").Bind(configuration); return(configuration); }
public void Init() { this.Configuration = TestHelper.GetApplicationConfiguration(TestContext.CurrentContext.TestDirectory); var services = new ServiceCollection(); services.AddSingleton <IBadApiSdkConfiguration>(this.Configuration); services.AddTransient <BadApiSdk>(); var serviceProvider = services.BuildServiceProvider(); this.Sdk = serviceProvider.GetRequiredService <BadApiSdk>(); }