public void lost_one_follower_from_exinsting_ones() { var twitter = new Mock<ITwitterParser>(); twitter.Setup(x => x.WhoAre(new[] { 42L })).Returns(new[] { new UserProfile(42, "42", "42L") }); var analyzer = new DifferencesAnalyzer(twitter.Object); var date = new DateTime(2001, 09, 11); var entry = analyzer.Analyze(date, new long[] { 1L, 42L }, new long[] { 1L }); entry.Date.Should().Be(date); entry.NewFollowers.Should().Be.Empty(); entry.LostFollowers.Should().Have.SameSequenceAs(new UserProfile(42, "42", "42L")); entry.SomethingHappened.Should().Be.True(); entry.FollowerCount.Should().Be(1); }
public void two_empty_lists() { var twitter = new Mock<ITwitterParser>(); var analyzer = new DifferencesAnalyzer(twitter.Object); var date = new DateTime(2001, 09, 11); var entry = analyzer.Analyze(date, new long[0], new long[0]); entry.Date.Should().Be(date); entry.NewFollowers.Should().Be.Empty(); entry.LostFollowers.Should().Be.Empty(); entry.SomethingHappened.Should().Be.False(); entry.FollowerCount.Should().Be(0); }