Package com.jcabi.github

Examples of com.jcabi.github.Repos


     * Repo can work.
     * @throws Exception If some problem inside
     */
    @Test
    public void works() throws Exception {
        final Repos repos = new MkRepos(new MkStorage.InFile(), "jeff");
        final Repo repo = repos.create(
            Json.createObjectBuilder().add("name", "test").build()
        );
        MatcherAssert.assertThat(
            repo.coordinates(),
            Matchers.hasToString("jeff/test")
View Full Code Here


     * This tests that the milestones() method in MkRepo is working fine.
     * @throws Exception - if anything goes wrong.
     */
    @Test
    public void returnsMkMilestones() throws Exception {
        final Repos repos = new MkRepos(new MkStorage.InFile(), "jeff");
        final Repo repo = repos.create(
            Json.createObjectBuilder().add("name", "test1").build()
        );
        final Milestones milestones = repo.milestones();
        MatcherAssert.assertThat(milestones, Matchers.notNullValue());
    }
View Full Code Here

     * MkRepos can create a repo.
     * @throws Exception If some problem inside
     */
    @Test
    public void createsRepository() throws Exception {
        final Repos repos = new MkRepos(new MkStorage.InFile(), "jeff");
        final Repo repo = MkReposTest.repo(repos, "test", "test repo");
        MatcherAssert.assertThat(
            repo.coordinates(),
            Matchers.hasToString("jeff/test")
        );
View Full Code Here

     * MkRepos can create a repo with details.
     * @throws Exception If some problem inside
     */
    @Test
    public void createsRepositoryWithDetails() throws Exception {
        final Repos repos = new MkRepos(new MkStorage.InFile(), "jeff");
        final Repo repo = MkReposTest.repo(repos, "hello", "my test repo");
        MatcherAssert.assertThat(
            new Repo.Smart(repo).description(),
            Matchers.startsWith("my test")
        );
View Full Code Here

     * MkRepos can remove an existing repo.
     * @throws Exception If some problem inside
     */
    @Test
    public void removesRepo() throws Exception {
        final Repos repos = new MkRepos(new MkStorage.InFile(), "jeff");
        final Repo repo = MkReposTest.repo(repos, "remove-me", "remove repo");
        MatcherAssert.assertThat(
            repos.get(repo.coordinates()),
            Matchers.notNullValue()
        );
        repos.remove(repo.coordinates());
        this.thrown.expect(IllegalArgumentException.class);
        this.thrown.expectMessage("repository jeff/remove-me doesn't exist");
        repos.get(repo.coordinates());
    }
View Full Code Here

     * @throws Exception if there is any error
     */
    @Test
    public void iterateRepos() throws Exception {
        final String since = "1";
        final Repos repos = new MkRepos(new MkStorage.InFile(), "tom");
        MkReposTest.repo(repos, since, "repo 1");
        MkReposTest.repo(repos, "2", "repo 2");
        MatcherAssert.assertThat(
            repos.iterate(since),
            Matchers.<Repo>iterableWithSize(2)
        );
    }
View Full Code Here

TOP

Related Classes of com.jcabi.github.Repos

Copyright © 2018 www.massapicom. 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.