public void IsFollowingForCurrentFromClientUserFollowers() { var githubClient = Substitute.For<IGitHubClient>(); var client = new ObservableFollowersClient(githubClient); client.IsFollowingForCurrent("alfhenrik"); githubClient.User.Followers.Received() .IsFollowingForCurrent("alfhenrik"); }
public async Task EnsuresNonNullArguments() { var client = new ObservableFollowersClient(Substitute.For<IGitHubClient>()); await Assert.ThrowsAsync<ArgumentNullException>(() => client.IsFollowingForCurrent(null).ToTask()); await Assert.ThrowsAsync<ArgumentException>(() => client.IsFollowingForCurrent("").ToTask()); }