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

                await Assert.ThrowsAsync <ArgumentException>(() => client.Get(""));
            }
示例#2
0
            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");
            }