Exemple #1
0
        public void Tweets_werden_gemappt() {
            var sut = new Mapper();
            IEnumerable<Tweet> result = null;
            sut.Out_Result += x => result = x;

            var twitterSearchResultCollection = new TwitterSearchResultCollection {
                new TwitterSearchResult {
                    FromUserScreenName = "Paul",
                    ProfileImageLocation = "pic#1",
                    CreatedDate = new DateTime(2003, 2, 1, 12, 05, 00),
                    Source = "<a href=''>web</a>"
                }
            };
            sut.In_Map(twitterSearchResultCollection);

            Assert.That(result.Count(), Is.EqualTo(1));
            var tweet = result.First();
            Assert.That(tweet.Name, Is.EqualTo("@Paul, 01.Feb 12:05 via web"));
        }