public async Task EnsuresNonEmptyArguments() { var gitHubClient = Substitute.For <IGitHubClient>(); var client = new ObservableCheckSuitesClient(gitHubClient); var request = new CheckSuiteTriggerRequest("123abc"); Assert.Throws <ArgumentException>(() => client.Request("", "repo", request)); Assert.Throws <ArgumentException>(() => client.Request("fake", "", request)); }
public async Task RequestsCorrectUrlWithRepositoryId() { var gitHubClient = Substitute.For <IGitHubClient>(); var client = new ObservableCheckSuitesClient(gitHubClient); var request = new CheckSuiteTriggerRequest("123abc"); client.Request(1, request); gitHubClient.Check.Suite.Received().Request(1, request); }