Package com.jcabi.github

Examples of com.jcabi.github.Releases


     * MkReleases can fetch empty list of releases.
     * @throws Exception if some problem inside
     */
    @Test
    public void canFetchEmptyListOfReleases() throws Exception {
        final Releases releases = MkReleasesTest.repo().releases();
        MatcherAssert.assertThat(
            releases.iterate(),
            Matchers.emptyIterable()
        );
    }
View Full Code Here


     * MkReleases can fetch non-empty list of releases.
     * @throws Exception If some problem inside
     */
    @Test
    public void canFetchNonEmptyListOfReleases() throws Exception {
        final Releases releases = MkReleasesTest.repo().releases();
        final String tag = "v1.0";
        releases.create(tag);
        MatcherAssert.assertThat(
            // @checkstyle MultipleStringLiterals (1 line)
            releases.iterate().iterator().next().json().getString("tag_name"),
            Matchers.equalTo(tag)
        );
    }
View Full Code Here

     * MkReleases can fetch a single release.
     * @throws Exception If some problem inside
     */
    @Test
    public void canFetchSingleRelease() throws Exception {
        final Releases releases = MkReleasesTest.repo().releases();
        MatcherAssert.assertThat(releases.get(1), Matchers.notNullValue());
    }
View Full Code Here

     * MkReleases can create a release.
     * @throws Exception If some problem inside
     */
    @Test
    public void canCreateRelease() throws Exception {
        final Releases releases = MkReleasesTest.repo().releases();
        final String tag = "v1.0.0";
        final Release release = releases.create(tag);
        MatcherAssert.assertThat(
            release.json().getString("tag_name"),
            Matchers.equalTo(tag)
        );
    }
View Full Code Here

     * MkReleases can iterate through the releases.
     * @throws Exception - if something goes wrong.
     */
    @Test
    public void iteratesReleases() throws Exception {
        final Releases releases = repo().releases();
        releases.create("v1.0.1");
        releases.create("v1.0.2");
        MatcherAssert.assertThat(
            releases.iterate(),
            Matchers.<Release>iterableWithSize(2)
        );
    }
View Full Code Here

     * MkReleases can be removed.
     * @throws Exception - if something goes wrong.
     */
    @Test
    public void canRemoveRelease() throws Exception {
        final Releases releases = repo().releases();
        releases.create("v1.1.1");
        releases.create("v1.1.2");
        MatcherAssert.assertThat(
            releases.iterate(),
            Matchers.<Release>iterableWithSize(2)
        );
        releases.remove(1);
        MatcherAssert.assertThat(
            releases.iterate(),
            Matchers.<Release>iterableWithSize(1)
        );
    }
View Full Code Here

     * Check if a release can be deleted.
     * @throws Exception If any problems occur.
     */
    @Test
    public void canDeleteRelease() throws Exception {
        final Releases releases = MkReleaseTest.releases();
        final Release release = releases.create("v1.0");
        release.delete();
        MatcherAssert.assertThat(
            releases.iterate().iterator().hasNext(),
            Matchers.is(false)
        );
    }
View Full Code Here

TOP

Related Classes of com.jcabi.github.Releases

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.