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