public void EnsuresNonNullArguments() { var gitHubClient = Substitute.For<IGitHubClient>(); var client = new ObservableRepositoryPagesClient(gitHubClient); Assert.Throws<ArgumentNullException>(() => client.GetLatest(null, "name")); Assert.Throws<ArgumentNullException>(() => client.GetLatest("owner", null)); }
public void RequestsCorrectUrlWithRepositoryId() { var gitHubClient = Substitute.For<IGitHubClient>(); var client = new ObservableRepositoryPagesClient(gitHubClient); client.GetLatest(1); gitHubClient.Received().Repository.Page.GetLatest(1); }