Package com.jcabi.http.mock

Examples of com.jcabi.http.mock.MkContainer.take()


        final RtLabels issues = new RtLabels(
            new JdkRequest(container.home()),
            repo()
        );
        issues.delete("issue");
        final MkQuery query = container.take();
        MatcherAssert.assertThat(
            query.method(),
            Matchers.equalTo(Request.DELETE)
        );
        MatcherAssert.assertThat(
View Full Code Here


            MatcherAssert.assertThat(
                gists.create(Collections.singletonMap("test", ""), false),
                Matchers.notNullValue()
            );
            MatcherAssert.assertThat(
                container.take().body(),
                Matchers.startsWith("{\"files\":{\"test\":{\"content\":")
            );
        } finally {
            container.stop();
        }
View Full Code Here

            new MkGithub(),
            new ApacheRequest(container.home())
        );
        try {
            gists.remove("12234");
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
            );
        } finally {
View Full Code Here

            new JdkRequest(container.home()),
            gist
        );
        final GistComment comment = comments.post(body);
        MatcherAssert.assertThat(
            container.take().method(),
            Matchers.equalTo(Request.POST)
        );
        MatcherAssert.assertThat(
            new GistComment.Smart(comment).body(),
            Matchers.equalTo(body)
View Full Code Here

            new ApacheRequest(container.home()),
            new Coordinates.Simple("test", "test-branch")
        );
        repo.patch(event(Event.ASSIGNED));
        MatcherAssert.assertThat(
            container.take().method(),
            Matchers.equalTo(Request.PATCH)
        );
        container.stop();
    }
View Full Code Here

            Mockito.mock(Github.class),
            new ApacheRequest(container.home())
        );
        final Repo repo = this.rule.repo(repos);
        MatcherAssert.assertThat(
            container.take().method(),
            Matchers.equalTo(Request.POST)
        );
        MatcherAssert.assertThat(
            repo.coordinates(),
            Matchers.equalTo((Coordinates) new Coordinates.Simple(owner, name))
View Full Code Here

            Mockito.mock(Github.class),
            new ApacheRequest(container.home())
        );
        repos.remove(new Coordinates.Simple("", ""));
        try {
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
            );
            MatcherAssert.assertThat(
View Full Code Here

            new JdkRequest(container.home()),
            owner
        );
        final Fork fork = forks.create(organization);
        MatcherAssert.assertThat(
            container.take().method(),
            Matchers.equalTo(Request.POST)
        );
        MatcherAssert.assertThat(
            fork.json().getString(ORGANIZATION),
            Matchers.equalTo(organization)
View Full Code Here

            RtHooksTest.repo()
        );
        try {
            final Hook hook = hooks.create(name, config);
            MatcherAssert.assertThat(
                container.take().method(),
                Matchers.equalTo(Request.POST)
            );
            MatcherAssert.assertThat(
                new Hook.Smart(hook).name(),
                Matchers.equalTo(name)
View Full Code Here

            new JdkRequest(container.home()),
            RtHooksTest.repo()
        );
        hooks.remove(1);
        try {
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
            );
            MatcherAssert.assertThat(
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.