예제 #1
0
            public async Task EnsuresNonEmptyArguments()
            {
                var connection = Substitute.For <IApiConnection>();
                var client     = new GitHubAppsClient(connection);

                await Assert.ThrowsAsync <ArgumentException>(() => client.GetOrganizationInstallationForCurrent(""));
            }
예제 #2
0
            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");
            }