Examples of MkContainer


Examples of com.jcabi.http.mock.MkContainer

     * RtHooks can fetch non empty list of hooks.
     * @throws Exception if some problem inside
     */
    @Test
    public void canFetchNonEmptyListOfHooks() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(
                HttpURLConnection.HTTP_OK,
                Json.createArrayBuilder()
                    .add(hook("hook 1", Collections.<String, String>emptyMap()))
                    .add(hook("hook 2", Collections.<String, String>emptyMap()))
                    .build().toString()
            )
        ).start();
        final RtHooks hooks = new RtHooks(
            new JdkRequest(container.home()),
            RtHooksTest.repo()
        );
        MatcherAssert.assertThat(
            hooks.iterate(),
            Matchers.<Hook>iterableWithSize(2)
        );
        container.stop();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.