Search in sources :

Example 6 with ArrayMap

use of com.jcabi.immutable.ArrayMap in project jcabi-github by jcabi.

the class RtPullsTest method iteratePulls.

/**
 * RtPulls can iterate pulls.
 * @throws Exception if there is any error
 */
@Test
public void iteratePulls() throws Exception {
    final MkContainer container = new MkGrizzlyContainer().next(new MkAnswer.Simple(HttpURLConnection.HTTP_OK, Json.createArrayBuilder().add(pull("new-topic")).add(pull("Amazing new feature")).build().toString())).start();
    final RtPulls pulls = new RtPulls(new ApacheRequest(container.home()), repo());
    MatcherAssert.assertThat(pulls.iterate(new ArrayMap<String, String>()), Matchers.<Pull>iterableWithSize(2));
    container.stop();
}
Also used : MkGrizzlyContainer(com.jcabi.http.mock.MkGrizzlyContainer) ApacheRequest(com.jcabi.http.request.ApacheRequest) ArrayMap(com.jcabi.immutable.ArrayMap) MkContainer(com.jcabi.http.mock.MkContainer) Test(org.junit.Test)

Aggregations

ArrayMap (com.jcabi.immutable.ArrayMap)6 Test (org.junit.Test)6 Milestones (com.jcabi.github.Milestones)2 Repo (com.jcabi.github.Repo)2 MkContainer (com.jcabi.http.mock.MkContainer)2 MkGrizzlyContainer (com.jcabi.http.mock.MkGrizzlyContainer)2 Milestone (com.jcabi.github.Milestone)1 ApacheRequest (com.jcabi.http.request.ApacheRequest)1 JdkRequest (com.jcabi.http.request.JdkRequest)1 VerboseCallable (com.jcabi.log.VerboseCallable)1 ArrayList (java.util.ArrayList)1 Callable (java.util.concurrent.Callable)1 ExecutorService (java.util.concurrent.ExecutorService)1