Search in sources :

Example 41 with FakeRequest

use of com.jcabi.http.request.FakeRequest in project jcabi-github by jcabi.

the class RtEventTest method canCompareInstances.

/**
 * RtEvent should be able to compare different instances.
 *
 * @throws Exception when a problem occurs.
 */
@Test
public void canCompareInstances() throws Exception {
    final RtEvent less = new RtEvent(new FakeRequest(), this.repo(), 1);
    final RtEvent greater = new RtEvent(new FakeRequest(), this.repo(), 2);
    MatcherAssert.assertThat(less.compareTo(greater), Matchers.lessThan(0));
    MatcherAssert.assertThat(greater.compareTo(less), Matchers.greaterThan(0));
}
Also used : FakeRequest(com.jcabi.http.request.FakeRequest) Test(org.junit.Test)

Example 42 with FakeRequest

use of com.jcabi.http.request.FakeRequest in project jcabi-github by jcabi.

the class RtGithubTest method retrievesRepos.

/**
 * RtGithub can retrieve its repos.
 *
 * @throws Exception if a problem occurs.
 */
@Test
public void retrievesRepos() throws Exception {
    final RtGithub github = new RtGithub(new FakeRequest());
    MatcherAssert.assertThat(github.repos(), Matchers.notNullValue());
}
Also used : FakeRequest(com.jcabi.http.request.FakeRequest) Test(org.junit.Test)

Example 43 with FakeRequest

use of com.jcabi.http.request.FakeRequest in project jcabi-github by jcabi.

the class RtGithubTest method retrievesMarkdown.

/**
 * RtGithub can retrieve the markdown.
 *
 * @throws Exception if a problem occurs.
 */
@Test
public void retrievesMarkdown() throws Exception {
    final RtGithub github = new RtGithub(new FakeRequest());
    MatcherAssert.assertThat(github.markdown(), Matchers.notNullValue());
}
Also used : FakeRequest(com.jcabi.http.request.FakeRequest) Test(org.junit.Test)

Example 44 with FakeRequest

use of com.jcabi.http.request.FakeRequest in project jcabi-github by jcabi.

the class RtGithubTest method retrievesGitignores.

/**
 * RtGithub can retrieve the gitignores.
 * @throws Exception if a problem occurs.
 */
@Test
public void retrievesGitignores() throws Exception {
    final RtGithub github = new RtGithub(new FakeRequest());
    MatcherAssert.assertThat(github.gitignores(), Matchers.notNullValue());
}
Also used : FakeRequest(com.jcabi.http.request.FakeRequest) Test(org.junit.Test)

Example 45 with FakeRequest

use of com.jcabi.http.request.FakeRequest in project jcabi-github by jcabi.

the class RtGithubTest method retrievesUsers.

/**
 * RtGithub can retrieve users.
 *
 * @throws Exception if a problem occurs.
 */
@Test
public void retrievesUsers() throws Exception {
    final RtGithub github = new RtGithub(new FakeRequest());
    MatcherAssert.assertThat(github.users(), Matchers.notNullValue());
}
Also used : FakeRequest(com.jcabi.http.request.FakeRequest) Test(org.junit.Test)

Aggregations

FakeRequest (com.jcabi.http.request.FakeRequest)65 Test (org.junit.Test)65 MkGithub (com.jcabi.github.mock.MkGithub)9 JsonObject (javax.json.JsonObject)3 Request (com.jcabi.http.Request)2 ApacheRequest (com.jcabi.http.request.ApacheRequest)2 MkOrganization (com.jcabi.github.mock.MkOrganization)1 Response (com.jcabi.http.Response)1 MkContainer (com.jcabi.http.mock.MkContainer)1 MkGrizzlyContainer (com.jcabi.http.mock.MkGrizzlyContainer)1 JsonResponse (com.jcabi.http.response.JsonResponse)1