Package com.jcabi.github

Examples of com.jcabi.github.Hook


     * @throws Exception if something goes wrong.
     */
    @Test
    public void canDeleteSingleHook() throws Exception {
        final Hooks hooks = MkHooksTest.repo().hooks();
        final Hook hook = hooks.create(
            // @checkstyle MultipleStringLiterals (1 line)
            "geocommit", Collections.<String, String>emptyMap()
        );
        MatcherAssert.assertThat(
            hooks.iterate(),
            Matchers.<Hook>iterableWithSize(1)
        );
        hooks.remove(hook.number());
        MatcherAssert.assertThat(
            hooks.iterate(),
            Matchers.emptyIterable()
        );
    }
View Full Code Here


     * @throws Exception if some problem inside
     */
    @Test
    public void canFetchSingleHook() throws Exception {
        final Hooks hooks = MkHooksTest.repo().hooks();
        final Hook hook = hooks.create(
            // @checkstyle MultipleStringLiterals (1 line)
            "geocommit", Collections.<String, String>emptyMap()
        );
        MatcherAssert.assertThat(
            hooks.get(hook.number()),
            Matchers.notNullValue()
        );
    }
View Full Code Here

     * @throws Exception If some problem inside
     */
    @Test
    public void canCreateHook() throws Exception {
        final Hooks hooks = MkHooksTest.repo().hooks();
        final Hook hook = hooks.create(
            "geocommit", Collections.<String, String>emptyMap()
        );
        MatcherAssert.assertThat(
            hooks.iterate().iterator().next().number(),
            Matchers.equalTo(hook.number())
        );
    }
View Full Code Here

TOP

Related Classes of com.jcabi.github.Hook

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.