コード例 #1
0
        public TweetResponse TwitterFeedByDays(int id = 0)
        {
            var days = id;

            accountManager.CreateAccount("pay_by_phone", days);
            accountManager.CreateAccount("PayByPhone", days);
            accountManager.CreateAccount("PayByPhone_UK", days);

            accounts = accountManager.GetAccounts();
            twitterResultService = new FormatTweetResultService();
            tweetResult = twitterResultService.CreateTweetResult(accounts);

            return tweetResult;
        }
        public void WhenCreateTweetResultisCalledandAnAccountIsProvideATweetResultIsReturned()
        {
            //Arrange
            var twitterAccessService = new TwitterAccessService();
            var calculateTweetAggregates = new CalculateTweetAggregatesService();
            var loadAccountDetailsService = new LoadAccountDetailsService(twitterAccessService, calculateTweetAggregates);
            var accountManager = new AccountManagerService(loadAccountDetailsService);
            accountManager.CreateAccount("PayByPhone_UK", 14);
            var accounts = accountManager.GetAccounts();

            //Act
            var twitterResultService = new FormatTweetResultService();
            var tweetResult = twitterResultService.CreateTweetResult(accounts);

            //Assert
            Assert.NotNull(tweetResult);
        }