Package com.jcabi.http.mock

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


                HttpURLConnection.HTTP_CREATED,
                "{\"sha\":\"0abcd89jcabitest\"}"
            )
        ).start();
        final Commits commits = new RtCommits(
            new ApacheRequest(container.home()),
            repo()
        );
        final JsonObject author = Json.createObjectBuilder()
            .add("name", "Scott").add("email", "scott@gmail.com")
            .add("date", "2011-06-17T14:53:35-07:00").build();
View Full Code Here


                HttpURLConnection.HTTP_CREATED,
                "{\"ref\":\"refs/heads/feature-a\"}"
            )
        ).start();
        final Tags tags = new RtTags(
            new ApacheRequest(container.home()),
            repo()
        );
        final JsonObject tagger = Json.createObjectBuilder()
            .add("name", "Scott").add("email", "scott@gmail.com")
            .add("date", "2011-06-17T14:53:35-07:00").build();
View Full Code Here

                "{\"test\":\"hook\"}"
            )
        ).start();
        try {
            final Hook hook = new RtHook(
                new ApacheRequest(container.home()),
                repo(),
                1
            );
            MatcherAssert.assertThat(
                hook.json(),
View Full Code Here

        ).next(new MkAnswer.Simple(first.toString()))
            .next(new MkAnswer.Simple(second.toString()))
            .start();
        try {
            final Search search = new RtGithub(
                new ApacheRequest(container.home())
            ).search();
            MatcherAssert.assertThat(
                search.codes("test4", "joined", Search.Order.DESC),
                Matchers.<Content>iterableWithSize(2)
            );
View Full Code Here

            )
        ).next(new MkAnswer.Simple(HttpURLConnection.HTTP_OK, resp.toString()))
            .start();
        try {
            final RtContents contents = new RtContents(
                new ApacheRequest(container.home()),
                repo()
            );
            final String path = "test.txt";
            final JsonObject json = Json.createObjectBuilder()
                .add("message", "let's change it.")
View Full Code Here

            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, body.toString())
        ).next(new MkAnswer.Simple("{\"path\":\"README.md\"}"))
            .next(new MkAnswer.Simple("{\"path\":\".gitignore\"}"))
            .start();
        final RtContents contents = new RtContents(
            new ApacheRequest(container.home()),
            repo()
        );
        try {
            MatcherAssert.assertThat(
                contents.iterate("dir", "branch2"),
View Full Code Here

                    .build()
                    .toString()
            )
        ).start();
        final RtGitignores gitignores = new RtGitignores(
            new RtGithub(new JdkRequest(container.home()))
        );
        MatcherAssert.assertThat(
            gitignores.iterate(),
            Matchers.<String>iterableWithSize(2)
        );
View Full Code Here

                    .add(RtCollaboratorsTest.json("dummy"))
                    .build().toString()
            )
        ).start();
        final Collaborators users = new RtCollaborators(
            new JdkRequest(container.home()),
            this.repo()
        );
        MatcherAssert.assertThat(
            users.iterate(),
            Matchers.<User>iterableWithSize(2)
View Full Code Here

                    .add(RtCollaboratorsTest.json("dummy"))
                    .build().toString()
            )
        ).start();
        final Collaborators users = new RtCollaborators(
            new JdkRequest(container.home()),
            this.repo()
        );
        try {
            users.add("dummy1");
            final MkQuery query = container.take();
View Full Code Here

                    .add(RtCollaboratorsTest.json("dummy"))
                    .build().toString()
            )
        ).start();
        final Collaborators users = new RtCollaborators(
            new JdkRequest(container.home()),
            this.repo()
        );
        try {
            MatcherAssert.assertThat(
                users.isCollaborator("octocat2"),
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.