Beispiel #1
0
            public async Task EnsuresNonEmptyArguments()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableCheckRunsClient(gitHubClient);

                Assert.Throws <ArgumentException>(() => client.Get("", "repo", 1));
                Assert.Throws <ArgumentException>(() => client.Get("fake", "", 1));
            }
Beispiel #2
0
            public async Task RequestsCorrectUrlWithRepositoryId()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableCheckRunsClient(gitHubClient);

                client.Get(1, 1);

                gitHubClient.Check.Run.Received().Get(1, 1);
            }
Beispiel #3
0
            public async Task RequestsCorrectUrl()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableCheckRunsClient(gitHubClient);

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

                gitHubClient.Check.Run.Received().Get("fake", "repo", 1);
            }