Пример #1
0
        public void BeforeEachTest()
        {
            VerifierSettings.UseStrictJson();
            server = new HttpTest();

            api = new CommerceApi(apiKey);
        }
        public IntegrationTests()
        {
            Directory.SetCurrentDirectory(Path.GetDirectoryName(typeof(IntegrationTests).Assembly.Location));
            var lines  = File.ReadAllLines("../../../.secrets.txt");
            var apiKey = lines[0].GetAfter(":");

            webhookSecret = lines[1].GetAfter(":");

            commerceApi = new CommerceApi(apiKey);
            commerceApi.EnableFiddlerDebugProxy("http://localhost.:8888");
        }
Пример #3
0
        public IntegrationTests()
        {
            Directory.SetCurrentDirectory(Path.GetDirectoryName(typeof(IntegrationTests).Assembly.Location));
            var lines  = File.ReadAllLines("../../.secrets.txt");
            var apiKey = lines[0].GetAfter(":");

            webhookSecret = lines[1].GetAfter(":");

            var webProxy = new WebProxy("http://localhost.:8888", BypassOnLocal: false);

            FlurlHttp.Configure(settings =>
            {
                settings.HttpClientFactory = new ProxyFactory(webProxy);
            });

            commerceApi = new CommerceApi(apiKey);
        }
Пример #4
0
        public void BeforeEachTest()
        {
            server = new HttpTest();

            com = new CommerceApi(apiKey);
        }