Search in sources :

Example 66 with Repository

use of com.meisolsson.githubsdk.model.Repository in project PocketHub by pockethub.

the class CreateCommentActivityTest method setUp.

@Before
public void setUp() {
    User user = User.builder().login("owner").build();
    Repository repo = Repository.builder().name("name").owner(user).build();
    activityTestRule.launchActivity(CreateCommentActivity.createIntent(repo, "abcdef"));
}
Also used : Repository(com.meisolsson.githubsdk.model.Repository) User(com.meisolsson.githubsdk.model.User) Before(org.junit.Before)

Example 67 with Repository

use of com.meisolsson.githubsdk.model.Repository in project PocketHub by pockethub.

the class EditIssueActivityTest method setUp.

@Before
public void setUp() {
    Repository repo = InfoUtils.createRepoFromData("owner", "repo");
    activityTestRule.launchActivity(EditIssueActivity.Companion.createIntent(repo));
}
Also used : Repository(com.meisolsson.githubsdk.model.Repository) Before(org.junit.Before)

Example 68 with Repository

use of com.meisolsson.githubsdk.model.Repository in project PocketHub by pockethub.

the class RepositoryUriMatcherTest method testHttpsUriWithOwnerAndName.

/**
 * Verify URI with owner but no name
 */
@Test
public void testHttpsUriWithOwnerAndName() {
    Repository repo = RepositoryUriMatcher.getRepository(Uri.parse("https://github.com/mojombo/jekyll"));
    assertNotNull(repo);
    assertEquals("jekyll", repo.name());
    assertNotNull(repo.owner());
    assertEquals("mojombo", repo.owner().login());
}
Also used : Repository(com.meisolsson.githubsdk.model.Repository) Test(org.junit.Test)

Aggregations

Repository (com.meisolsson.githubsdk.model.Repository)68 User (com.meisolsson.githubsdk.model.User)18 GitHubEvent (com.meisolsson.githubsdk.model.GitHubEvent)9 Issue (com.meisolsson.githubsdk.model.Issue)9 Intent (android.content.Intent)8 View (android.view.View)8 TextView (android.widget.TextView)6 Bundle (android.os.Bundle)5 ImageView (android.widget.ImageView)5 LayoutInflater (android.view.LayoutInflater)4 MaterialDialog (com.afollestad.materialdialogs.MaterialDialog)4 Test (org.junit.Test)4 Uri (android.net.Uri)3 Menu (android.view.Menu)3 ViewGroup (android.view.ViewGroup)3 LinearLayout (android.widget.LinearLayout)3 R (com.gh4a.R)3 RepositoryActivity (com.gh4a.activities.RepositoryActivity)3 UserActivity (com.gh4a.activities.UserActivity)3 ApiHelpers (com.gh4a.utils.ApiHelpers)3