use of com.jcabi.github.Milestone in project jcabi-github by jcabi.
the class MkMilestonesTest method createsMilestone.
/**
* This tests that MkMilestones can create a MkMilestone.
* @throws Exception - if something goes wrong.
*/
@Test
public void createsMilestone() throws Exception {
final Milestones milestones = new MkGithub().randomRepo().milestones();
final Milestone milestone = milestones.create("test milestone");
MatcherAssert.assertThat(milestone, Matchers.notNullValue());
MatcherAssert.assertThat(milestones.create("another milestone"), Matchers.notNullValue());
}
use of com.jcabi.github.Milestone in project jcabi-github by jcabi.
the class MkMilestonesTest method removesMilestone.
/**
* This tests that MkMilestones can remove a certain MkMilestone, by number.
* @throws Exception - if something goes wrong.
*/
@Test
public void removesMilestone() throws Exception {
final Milestones milestones = new MkGithub().randomRepo().milestones();
final Milestone created = milestones.create("testTitle");
MatcherAssert.assertThat(milestones.iterate(new ArrayMap<String, String>()), Matchers.<Milestone>iterableWithSize(1));
milestones.remove(created.number());
MatcherAssert.assertThat(milestones.iterate(new ArrayMap<String, String>()), Matchers.<Milestone>iterableWithSize(0));
}
use of com.jcabi.github.Milestone in project jcabi-github by jcabi.
the class MkMilestonesTest method getsMilestone.
/**
* This tests that MkMilestones can return a certain MkMilestone, by number.
* @throws Exception - if something goes wrong.
*/
@Test
public void getsMilestone() throws Exception {
final Milestones milestones = new MkGithub().randomRepo().milestones();
final Milestone created = milestones.create("test");
MatcherAssert.assertThat(milestones.get(created.number()), Matchers.notNullValue());
}
Aggregations