Package com.jcabi.http.mock

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


            MatcherAssert.assertThat(
                json.getString("body"),
                Matchers.is("test5")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtComment can patch a comment.
View Full Code Here


            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(), Matchers.equalTo(Request.PATCH)
            );
        } finally {
            container.stop();
        }
    }

    /**
     * This tests that the toString() method is working fine.
View Full Code Here

            MatcherAssert.assertThat(
                stringComment, Matchers.not(Matchers.isEmptyOrNullString())
            );
            MatcherAssert.assertThat(stringComment, Matchers.endsWith("10"));
        } finally {
            container.stop();
        }
    }

    /**
     * This method returns a Repo for testing.
View Full Code Here

            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith("/user/orgs")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtOrganizations can iterate organizations for an unauthenticated user.
View Full Code Here

            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith(String.format("/users/%s/orgs", username))
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtOrganizations should be able to get a single organization.
View Full Code Here

            MatcherAssert.assertThat(
                orgs.get("org"),
                Matchers.notNullValue()
            );
        } finally {
            container.stop();
        }
    }

    /**
     * Create and return organization to test.
View Full Code Here

        );
        MatcherAssert.assertThat(
            users.iterate(),
            Matchers.<User>iterableWithSize(2)
        );
        container.stop();
    }

    /**
     * RtAssignees can check if user is assignee for this repo.
     * @throws Exception Exception If some problem inside
View Full Code Here

        );
        MatcherAssert.assertThat(
            users.check("octocat2"),
            Matchers.equalTo(true)
        );
        container.stop();
    }

    /**
     * RtAssignees can check if user is NOT assignee for this repo.
     * @throws Exception Exception If some problem inside
View Full Code Here

        );
        MatcherAssert.assertThat(
            users.check("octocat33"),
            Matchers.equalTo(false)
        );
        container.stop();
    }

    /**
     * Create and return JsonObject to test.
     * @param login Username to login
View Full Code Here

            MatcherAssert.assertThat(
                newCommit.sha(),
                Matchers.equalTo("0abcd89jcabitest")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * This method returns a Repo for testing.
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.