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)); }
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); }
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); }