public void EnsureNonNullArguments() { var client = new ObservableStatisticsClient(Substitute.For<IGitHubClient>()); Assert.Throws<ArgumentNullException>(() => client.GetCommitActivity("owner", null)); Assert.Throws<ArgumentNullException>(() => client.GetCommitActivity(null, "name")); Assert.Throws<ArgumentException>(() => client.GetCommitActivity("", "name")); Assert.Throws<ArgumentException>(() => client.GetCommitActivity("owner", "")); }
public void RequestsCorrectUrlWithRepositoryId() { var gitHubClient = Substitute.For<IGitHubClient>(); var statisticsClient = new ObservableStatisticsClient(gitHubClient); statisticsClient.GetCommitActivity(1); gitHubClient.Repository.Statistics.Received().GetCommitActivity(1); }