Пример #1
0
 public void GivenNullConnectionInfo_ThenThrowArgumentNullException()
 {
     Should.Throw <ArgumentNullException>(() =>
     {
         var _ = new FileImportConfiguration(string.Empty, string.Empty);
     });
 }
        public void GivenMaxSimultaneousRequestsConstructorArg_ThenAllThrottlingPropertiesShouldTakeThatValue()
        {
            const int expected = 13;

            var configuration = new FileImportConfiguration(string.Empty, string.Empty, null, _connectionInfo.ApiBaseUrl, _connectionInfo.ClientKey, _connectionInfo.ClientSecret, _connectionInfo.OAuthUrl, _connectionInfo.MetadataUrl, _connectionInfo.DependenciesUrl,
                                                            maxSimultaneousRequests: expected);

            configuration.TaskCapacity.ShouldBe(expected);
            configuration.ConnectionLimit.ShouldBe(expected);
            configuration.MaxSimultaneousRequests.ShouldBe(expected);
        }