本文整理汇总了Java中com.jcabi.github.Repos.create方法的典型用法代码示例。如果您正苦于以下问题:Java Repos.create方法的具体用法?Java Repos.create怎么用?Java Repos.create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jcabi.github.Repos
的用法示例。
在下文中一共展示了Repos.create方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: works
import com.jcabi.github.Repos; //导入方法依赖的package包/类
/**
* 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(
new Repos.RepoCreate("test5", false)
);
MatcherAssert.assertThat(
repo.coordinates(),
Matchers.hasToString("jeff/test5")
);
}
示例2: returnsMkMilestones
import com.jcabi.github.Repos; //导入方法依赖的package包/类
/**
* 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(
new Repos.RepoCreate("test1", false)
);
final Milestones milestones = repo.milestones();
MatcherAssert.assertThat(milestones, Matchers.notNullValue());
}
示例3: repo
import com.jcabi.github.Repos; //导入方法依赖的package包/类
/**
* Create and return Repo to test.
* @param repos Repos
* @param name Repo name
* @param desc Repo description
* @return Repo
* @throws Exception if there is any error
*/
private static Repo repo(final Repos repos, final String name,
final String desc) throws Exception {
return repos.create(
new Repos.RepoCreate(name, false).withDescription(desc)
);
}