Examples of MkGithub


Examples of com.jcabi.github.mock.MkGithub

                    .build().toString()
            )
        ).start();
        try {
            final Organizations orgs = new RtOrganizations(
                new MkGithub(),
                new ApacheRequest(container.home()),
                Mockito.mock(User.class)
            );
            MatcherAssert.assertThat(
                orgs.iterate(),
View Full Code Here

Examples of com.jcabi.github.mock.MkGithub

                    .build().toString()
            )
        ).start();
        try {
            final Organizations orgs = new RtOrganizations(
                new MkGithub(),
                new ApacheRequest(container.home()),
                Mockito.mock(User.class)
            );
            final String username = "octopus";
            MatcherAssert.assertThat(
View Full Code Here

Examples of com.jcabi.github.mock.MkGithub

        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "")
        ).start();
        try {
            final Organizations orgs = new RtOrganizations(
                new MkGithub(),
                new ApacheRequest(container.home()),
                Mockito.mock(User.class)
            );
            MatcherAssert.assertThat(
                orgs.get("org"),
View Full Code Here

Examples of com.jcabi.github.mock.MkGithub

     *
     * @return Repo - a repo to be used for test.
     * @throws Exception - if anything goes wrong.
     */
    private static Repo repo() throws Exception {
        return new MkGithub().repos().create(
            Json.createObjectBuilder().add("name", "test").build()
        );
    }
View Full Code Here

Examples of com.jcabi.github.mock.MkGithub

     * This method returns a Repo for testing.
     * @return Repo - a repo to be used for test.
     * @throws Exception - if anything goes wrong.
     */
    private static Repo repo() throws Exception {
        return new MkGithub().repos().create(
            Json.createObjectBuilder().add("name", "test").build()
        );
    }
View Full Code Here

Examples of com.jcabi.github.mock.MkGithub

     */
    private Repo repo() throws Exception {
        final Repo repo = Mockito.mock(Repo.class);
        Mockito.doReturn(new Coordinates.Simple("test", "collaboratorrepo"))
            .when(repo).coordinates();
        Mockito.doReturn(new MkGithub(new MkStorage.InFile(), "userLogin"))
            .when(repo).github();
        return repo;
    }
View Full Code Here

Examples of com.jcabi.github.mock.MkGithub

     * This method returns a Repo for testing.
     * @return Repo - a repo to be used for test.
     * @throws Exception - if anything goes wrong.
     */
    private static Repo repo() throws Exception {
        return new MkGithub().repos().create(
            Json.createObjectBuilder().add("name", "test").build()
        );
    }
View Full Code Here

Examples of com.jcabi.github.mock.MkGithub

     * @throws Exception if a problem occurs.
     */
    @Test
    public void canFetchIssueAsJson() throws Exception {
        final RtOrganization org = new RtOrganization(
            new MkGithub(),
            new FakeRequest().withBody("{\"organization\":\"json\"}"),
            "testJson"
        );
        MatcherAssert.assertThat(
            org.json().getString("organization"),
View Full Code Here

Examples of com.jcabi.github.mock.MkGithub

    public void patchWithJson() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "response")
        ).start();
        final RtOrganization org = new RtOrganization(
            new MkGithub(),
            new ApacheRequest(container.home()),
            "testPatch"
        );
        org.patch(
            Json.createObjectBuilder().add("patch", "test").build()
View Full Code Here

Examples of com.jcabi.github.mock.MkGithub

     * @throws Exception if a problem occurs.
     */
    @Test
    public void canCompareInstances() throws Exception {
        final RtOrganization less = new RtOrganization(
            new MkGithub(),
            new FakeRequest(),
            "abc"
        );
        final RtOrganization greater = new RtOrganization(
            new MkGithub(),
            new FakeRequest(),
            "def"
        );
        MatcherAssert.assertThat(
            less.compareTo(greater), Matchers.lessThan(0)
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.