Examples of MkGrizzlyContainer


Examples of com.jcabi.http.mock.MkGrizzlyContainer

     * RtMilestones can remove a milestone.
     * @throws Exception if some problem inside
     */
    @Test
    public void deleteMilestone() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_NO_CONTENT, "")
        ).start();
        final RtMilestones milestones = new RtMilestones(
            new ApacheRequest(container.home()),
            repo()
View Full Code Here

Examples of com.jcabi.http.mock.MkGrizzlyContainer

    @Test
    public void createLabel() throws Exception {
        final String name = "API";
        final String color = "FFFFFF";
        final String body = label(name, color).toString();
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_CREATED, body)
        ).next(new MkAnswer.Simple(HttpURLConnection.HTTP_OK, body)).start();
        final RtLabels labels = new RtLabels(
            new JdkRequest(container.home()),
            repo()
View Full Code Here

Examples of com.jcabi.http.mock.MkGrizzlyContainer

     */
    @Test
    public void getSingleLabel() throws Exception {
        final String name = "bug";
        final String color = "f29513";
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(
                HttpURLConnection.HTTP_OK,
                label(name, color).toString()
            )
        ).start();
View Full Code Here

Examples of com.jcabi.http.mock.MkGrizzlyContainer

     * RtLabels can delete a label.
     * @throws Exception if some problem inside
     */
    @Test
    public void deleteLabel() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_NO_CONTENT, "")
        ).start();
        final RtLabels issues = new RtLabels(
            new JdkRequest(container.home()),
            repo()
View Full Code Here

Examples of com.jcabi.http.mock.MkGrizzlyContainer

     * RtLabels can iterate labels.
     * @throws Exception if there is any error
     */
    @Test
    public void iterateLabels() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(
                HttpURLConnection.HTTP_OK,
                Json.createArrayBuilder()
                    .add(label("new issue", "f29512"))
                    .add(label("new bug", "f29522"))
View Full Code Here

Examples of com.jcabi.http.mock.MkGrizzlyContainer

    public void jumpNextPage() throws Exception {
        final String jeff = "Jeff";
        final String mark = "Mark";
        final String judy = "Judy";
        final String jessy = "Jessy";
        final MkContainer container = new MkGrizzlyContainer().next(
            RtValuePaginationTest.simple(jeff, mark)
                .withHeader("Link", "</s?page=3&per_page=100>; rel=\"next\"")
        ).next(RtValuePaginationTest.simple(judy, jessy)).start();
        final Request request = new ApacheRequest(container.home());
        final RtValuePagination<JsonObject, JsonArray> page =
View Full Code Here

Examples of com.jcabi.http.mock.MkGrizzlyContainer

     */
    @Test(expected = NoSuchElementException.class)
    public void throwsIfNoMoreElement() throws Exception {
        final String jeff = "other Jeff";
        final String mark = "other Mark";
        final MkContainer container = new MkGrizzlyContainer().next(
            RtValuePaginationTest.simple(jeff, mark)
        ).start();
        try {
            final Request request = new ApacheRequest(container.home());
            final RtValuePagination<JsonObject, JsonArray> page =
View Full Code Here

Examples of com.jcabi.http.mock.MkGrizzlyContainer

     *
     * @throws Exception if a problem occurs.
     */
    @Test
    public void canCreateFiles() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(
                HttpURLConnection.HTTP_CREATED,
                "{\"id\":\"1\"}"
            )
        ).start();
View Full Code Here

Examples of com.jcabi.http.mock.MkGrizzlyContainer

     *
     * @throws Exception if a problem occurs.
     */
    @Test
    public void canRetrieveSpecificGist() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "testing")
        ).start();
        final Gists gists = new RtGists(
            new MkGithub(),
            new ApacheRequest(container.home())
View Full Code Here

Examples of com.jcabi.http.mock.MkGrizzlyContainer

     *
     * @throws Exception if a problem occurs.
     */
    @Test
    public void canIterateThrouRtGists() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(
                HttpURLConnection.HTTP_OK,
                "[{\"id\":\"hello\"}]"
            )
        ).start();
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.