Class TestGitHubApis

  • public class TestGitHubApis
    extends AbstractExampleTest

    Some simple tests to format UriTemplate for the various GitHub APIs. This test assumes that the following system properties are set:


    If the properties are set, the test will not fail the build.

    This test demonstrates the utility of a single URI template that can be used to express the majority of the functionality offered by the GitHub API. For this test, the following template expression is used:

    $Revision: 1.1 $
    Ryan J. McDonough
    • Constructor Detail

      • TestGitHubApis

        public TestGitHubApis()
    • Method Detail

      • setUp

        public static void setUp()
                          throws Exception
        Checks assumptions that the username and password properties are set and that the host is reachable.
      • testCommitsApi

        public void testCommitsApi()
                            throws Exception
        This test demonstrates that while the expression defined 4 variables but we only supply 3 values, the expanded URI will not render a dangling "/" and generate a proper URI for the GitHub API.
      • testCommitsApiWithSpecificCommit

        public void testCommitsApiWithSpecificCommit()
                                              throws Exception
        Looks at a specific commit