Package com.jcabi.http.mock

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


            MatcherAssert.assertThat(
                container.take().method(),
                Matchers.equalTo(Request.POST)
            );
        } finally {
            container.stop();
        }
    }

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


            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith("/repos/test/repo/hooks/1")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * Create and return repo for testing.
View Full Code Here

            MatcherAssert.assertThat(
                search.codes("test4", "joined", Search.Order.DESC),
                Matchers.<Content>iterableWithSize(2)
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtSearch can read non-unicode.
View Full Code Here

            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/repos/test/contents/contents/to/remove")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtContents can update files into the repository.
View Full Code Here

            MatcherAssert.assertThat(
                query.body(),
                Matchers.equalTo(json.toString())
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtContents can iterate through a directory's contents.
View Full Code Here

            MatcherAssert.assertThat(
                contents.iterate("dir", "branch2"),
                Matchers.<Content>iterableWithSize(2)
            );
        } finally {
            container.stop();
        }
    }

    /**
     * Create and return repo for testing.
View Full Code Here

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

    /**
     * RtGitignores can get raw template by name.
     * @throws Exception if there is any error
View Full Code Here

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

    /**
     * User can be added to a repo as a collaborator.
     * @throws Exception if any error occurs.
View Full Code Here

            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.PUT)
            );
        } finally {
            container.stop();
        }
    }

    /**
     * User can be checked for being a collaborator.
View Full Code Here

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

    /**
     * User can be removed from a list of collaborators.
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.