public async Task EnsuresNonNullArguments()
            {
                var client = new ObservableIssuesEventsClient(Substitute.For <IGitHubClient>());

                Assert.Throws <ArgumentNullException>(() => client.Get(null, "name", 1));
                Assert.Throws <ArgumentNullException>(() => client.Get("owner", null, 1));
            }
Example #2
0
            public void RequestsCorrectUrlWithRepositoryId()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableIssuesEventsClient(gitHubClient);

                client.Get(1, 42);

                gitHubClient.Received().Issue.Events.Get(1, 42);
            }
Example #3
0
            public void RequestsCorrectUrl()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableIssuesEventsClient(gitHubClient);

                client.Get("fake", "repo", 42);

                gitHubClient.Received().Issue.Events.Get("fake", "repo", 42);
            }