Package com.jcabi.github

Examples of com.jcabi.github.Gists


     * This tests that the remove() method in MkGists is working fine.
     * @throws Exception - if anything goes wrong.
     */
    @Test
    public void removesGistByIdentifier() throws Exception {
        final Gists gists = new MkGithub().gists();
        final Gist gist = gists.create(
            Collections.singletonMap("fileName.txt", "content"), false
        );
        MatcherAssert.assertThat(
            gists.iterate(),
            Matchers.hasItem(gist)
        );
        gists.remove(gist.identifier());
        MatcherAssert.assertThat(
            gists.iterate(),
            Matchers.not(Matchers.hasItem(gist))
        );
    }
View Full Code Here


     * Test to check issue #128
     * @throws Exception If some problem inside
     */
    @Test
    public void worksWithSeveralGists() throws Exception {
        final Gists gists = new MkGithub().gists();
        final Gist gist = gists.create(
            Collections.singletonMap("test-file-name.txt", "none"), false
        );
        final Gist othergist = gists.create(
            Collections.singletonMap("test-file-name2.txt", ""), false
        );
        final String file = "t.txt";
        gist.write(file, "hello, everybody!");
        othergist.write(file, "bye, everybody!");
View Full Code Here

TOP

Related Classes of com.jcabi.github.Gists

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.