private void InitializeData()
        {
            _credentials      = A.Fake <ITwitterCredentials>();
            _tokenRateLimits  = A.Fake <ITokenRateLimits>();
            _tokenRateLimit   = A.Fake <ITokenRateLimit>();
            _tokenRateLimits2 = A.Fake <ITokenRateLimits>();

            _refreshedTokenRateLimits = A.Fake <ITokenRateLimits>();
            _refreshedTokenRateLimit  = A.Fake <ITokenRateLimit>();

            _tokenRateLimit.CallsTo(x => x.Remaining).Returns(0);
            _tokenRateLimit.CallsTo(x => x.ResetDateTime).Returns(DateTime.Now.AddMinutes(1));

            _twitterQuery = A.Fake <ITwitterQuery>();
            _twitterQuery.CallsTo(x => x.QueryURL).Returns(TEST_QUERY);
            _twitterQuery.CallsTo(x => x.HttpMethod).Returns(HttpMethod.GET);
            _twitterQuery.CallsTo(x => x.QueryParameters).Returns(Enumerable.Empty <IOAuthQueryParameter>());
        }
Пример #2
0
        private void InitializeData()
        {
            _credentials                   = A.Fake <ITwitterCredentials>();
            _credentials.AccessToken       = TestHelper.GenerateString();
            _credentials.AccessTokenSecret = TestHelper.GenerateString();

            _credentialsRateLimits  = A.Fake <ICredentialsRateLimits>();
            _endpointRateLimit      = A.Fake <IEndpointRateLimit>();
            _credentialsRateLimits2 = A.Fake <ICredentialsRateLimits>();

            _refreshedCredentialsRateLimits = A.Fake <ICredentialsRateLimits>();
            _refreshedEndpointRateLimit     = A.Fake <IEndpointRateLimit>();

            _endpointRateLimit.CallsTo(x => x.Remaining).Returns(0);
            _endpointRateLimit.CallsTo(x => x.ResetDateTime).Returns(DateTime.Now.AddMinutes(1));

            _twitterQuery = A.Fake <ITwitterQuery>();
            _twitterQuery.CallsTo(x => x.QueryURL).Returns(TEST_QUERY);
            _twitterQuery.CallsTo(x => x.HttpMethod).Returns(HttpMethod.GET);
            _twitterQuery.CallsTo(x => x.QueryParameters).Returns(Enumerable.Empty <IOAuthQueryParameter>());
        }
        private void InitializeData()
        {
            _credentials = A.Fake<ITwitterCredentials>();
            _credentials.AccessToken = TestHelper.GenerateString();
            _credentials.AccessTokenSecret = TestHelper.GenerateString();

            _credentialsRateLimits = A.Fake<ICredentialsRateLimits>();
            _endpointRateLimit = A.Fake<IEndpointRateLimit>();
            _credentialsRateLimits2 = A.Fake<ICredentialsRateLimits>();

            _refreshedCredentialsRateLimits = A.Fake<ICredentialsRateLimits>();
            _refreshedEndpointRateLimit = A.Fake<IEndpointRateLimit>();

            _endpointRateLimit.CallsTo(x => x.Remaining).Returns(0);
            _endpointRateLimit.CallsTo(x => x.ResetDateTime).Returns(DateTime.Now.AddMinutes(1));

            _twitterQuery = A.Fake<ITwitterQuery>();
            _twitterQuery.CallsTo(x => x.QueryURL).Returns(TEST_QUERY);
            _twitterQuery.CallsTo(x => x.HttpMethod).Returns(HttpMethod.GET);
            _twitterQuery.CallsTo(x => x.QueryParameters).Returns(Enumerable.Empty<IOAuthQueryParameter>());
        }
Пример #4
0
        private void InitializeData()
        {
            _credentials = A.Fake<ITwitterCredentials>();
            _tokenRateLimits = A.Fake<ITokenRateLimits>();
            _tokenRateLimit = A.Fake<ITokenRateLimit>();
            _tokenRateLimits2 = A.Fake<ITokenRateLimits>();

            _refreshedTokenRateLimits = A.Fake<ITokenRateLimits>();
            _refreshedTokenRateLimit = A.Fake<ITokenRateLimit>();

            _tokenRateLimit.CallsTo(x => x.Remaining).Returns(0);
            _tokenRateLimit.CallsTo(x => x.ResetDateTime).Returns(DateTime.Now.AddMinutes(1));

            _twitterQuery = A.Fake<ITwitterQuery>();
            _twitterQuery.CallsTo(x => x.QueryURL).Returns(TEST_QUERY);
            _twitterQuery.CallsTo(x => x.HttpMethod).Returns(HttpMethod.GET);
            _twitterQuery.CallsTo(x => x.QueryParameters).Returns(Enumerable.Empty<IOAuthQueryParameter>());
        }