示例#1
0
        public static TestSdkConfiguration GetApplicationConfiguration(string outputPath)
        {
            var configuration = new TestSdkConfiguration();

            var iConfig = GetIConfigurationRoot(outputPath);

            iConfig.GetSection("testSdkConfiguration").Bind(configuration);

            return(configuration);
        }
示例#2
0
        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>();
        }