Пример #1
0
        protected Client(Settings settings)
        {
            Settings = settings;

            // SecurityProtocolType values below not available in Mono < 4.3
            const int SecurityProtocolTypeTls11 = 768;
            const int SecurityProtocolTypeTls12 = 3072;

            ServicePointManager.SecurityProtocol |= (SecurityProtocolType)(SecurityProtocolTypeTls12 | SecurityProtocolTypeTls11);
        }
Пример #2
0
        protected Client(Settings settings)
        {
            Settings = settings;
           
            // Don't include this on Travis build
            // .NET 4.0 does not have these constants
#if NOT_RUNNING_ON_4_0
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
#endif
        }
        public void AccountList_supports_paging()
        {
            var testSettings = SettingsFixture.TestSettings;
            var moddedSettings = new Settings(testSettings.ApiKey, testSettings.Subdomain,
                testSettings.PrivateKey, 5);
            Client.Instance.ApplySettings(moddedSettings);

            var accounts = Accounts.List();
            accounts.Should().HaveCount(5);
            accounts.Capacity.Should().BeGreaterOrEqualTo(5);

            accounts.Next.Should().NotBeEmpty();
        }
Пример #4
0
 protected Client(Settings settings)
 {
     Settings = settings;
 }
Пример #5
0
 internal void ApplySettings(Settings settings)
 {
     Settings = settings;
 }