Esempio n. 1
0
        public void Should_return_tweet_data_contract()
        {
            ITwitterRepository repository = new TwitterRepository();
            var actual       = repository.AggregateTimeLine(TestVectors.TestTweetCollection());
            var filteredData = repository.FilterByCriteria(actual);

            Assert.Equal(filteredData.GetType(), typeof(TweetDataContract));
        }
Esempio n. 2
0
        public void TweetDataContract_should_match()
        {
            ITwitterRepository repository = new TwitterRepository();
            var actual       = repository.AggregateTimeLine(TestVectors.TestTweetCollection());
            var filteredData = repository.FilterByCriteria(actual);

            var fromRepo = filteredData.TimeLine.First();
            var fromTest = TestVectors.TestTweets().First(a => a.User.Id == fromRepo.User.Id);

            fromRepo.User.Name.Should().BeEquivalentTo(fromTest.User.Name);
        }