public void should_raise_UserUnfollowed_when_the_user_is_unfollowed() { var users = new List<int> { 1 }; var makingFriendsService = new MakingFriendsService(twitterWrapper); var isUserUnfollowedRaised = false; makingFriendsService.UserUnfollowed += (sender, e) => { isUserUnfollowedRaised = true; }; makingFriendsService.MakeFriendsWith(users); Assert.IsTrue(isUserUnfollowedRaised); }
public void should_follow_each_user_and_unfollow_them_when_making_friends() { var users = new List<int> { 1, 2 }; var makingFriendsService = new MakingFriendsService(twitterWrapper); makingFriendsService.MakeFriendsWith(users); twitterWrapper.AssertWasCalled(x => x.Follow(1)); twitterWrapper.AssertWasCalled(x => x.Follow(2)); twitterWrapper.AssertWasCalled(x => x.Unfollow(1)); twitterWrapper.AssertWasCalled(x => x.Unfollow(2)); }