public async Task EnsuresNonEmptyArguments() { var connection = Substitute.For <IApiConnection>(); var client = new GitHubAppsClient(connection); await Assert.ThrowsAsync <ArgumentException>(() => client.GetOrganizationInstallationForCurrent("")); }
public void GetsFromCorrectUrl() { var connection = Substitute.For <IApiConnection>(); var client = new GitHubAppsClient(connection); client.GetOrganizationInstallationForCurrent("ducks"); connection.Received().Get <Installation>(Arg.Is <Uri>(u => u.ToString() == "orgs/ducks/installation"), null, "application/vnd.github.machine-man-preview+json"); }