@Test public void putIntoIntent() { Article article = new Article(); article.id = 1L; article.alias = "alias"; article.url = "http: article.title = "test title"; article.description = "test description"; article.image = "image url"; article.content = "<p>test paragraph</p>"; article.author = "jake klinker"; article.source = "google.com"; article.domain = "google.com"; article.duration = 1; article.insertedAt = 2; article.isArticle = true; article.saved = false; Intent intent = new Intent(); article.putIntoIntent(intent); assertEquals(1L, intent.getLongExtra("_id", 0L)); assertEquals("alias", intent.getStringExtra("alias")); assertEquals("http: assertEquals("test title", intent.getStringExtra("title")); assertEquals("test description", intent.getStringExtra("description")); assertEquals("image url", intent.getStringExtra("image")); assertEquals("<p>test paragraph</p>", intent.getStringExtra("content")); assertEquals("jake klinker", intent.getStringExtra("author")); assertEquals("google.com", intent.getStringExtra("source")); assertEquals("google.com", intent.getStringExtra("domain")); assertEquals(1, intent.getIntExtra("duration", 0)); assertEquals(2, intent.getLongExtra("inserted_at", 0)); assertTrue(intent.getBooleanExtra("is_article", false)); assertFalse(intent.getBooleanExtra("saved", true)); }
public void putIntoIntent(Intent intent) { intent.putExtra(ArticleModel.COLUMN_ID, this.id); intent.putExtra(ArticleModel.COLUMN_ALIAS, this.alias); intent.putExtra(ArticleModel.COLUMN_URL, this.url); intent.putExtra(ArticleModel.COLUMN_TITLE, this.title); intent.putExtra(ArticleModel.COLUMN_DESCRIPTION, this.description); intent.putExtra(ArticleModel.COLUMN_IMAGE, this.image); intent.putExtra(ContentModel.COLUMN_CONTENT, this.content); intent.putExtra(ArticleModel.COLUMN_AUTHOR, this.author); intent.putExtra(ArticleModel.COLUMN_SOURCE, this.source); intent.putExtra(ArticleModel.COLUMN_DOMAIN, this.domain); intent.putExtra(ArticleModel.COLUMN_DURATION, this.duration); intent.putExtra(ArticleModel.COLUMN_INSERTED_AT, this.insertedAt); intent.putExtra(ArticleModel.COLUMN_IS_ARTICLE, this.isArticle); intent.putExtra(ArticleModel.COLUMN_SAVED, this.saved); }
Article implements DatabaseModel { public void putIntoIntent(Intent intent) { intent.putExtra(ArticleModel.COLUMN_ID, this.id); intent.putExtra(ArticleModel.COLUMN_ALIAS, this.alias); intent.putExtra(ArticleModel.COLUMN_URL, this.url); intent.putExtra(ArticleModel.COLUMN_TITLE, this.title); intent.putExtra(ArticleModel.COLUMN_DESCRIPTION, this.description); intent.putExtra(ArticleModel.COLUMN_IMAGE, this.image); intent.putExtra(ContentModel.COLUMN_CONTENT, this.content); intent.putExtra(ArticleModel.COLUMN_AUTHOR, this.author); intent.putExtra(ArticleModel.COLUMN_SOURCE, this.source); intent.putExtra(ArticleModel.COLUMN_DOMAIN, this.domain); intent.putExtra(ArticleModel.COLUMN_DURATION, this.duration); intent.putExtra(ArticleModel.COLUMN_INSERTED_AT, this.insertedAt); intent.putExtra(ArticleModel.COLUMN_IS_ARTICLE, this.isArticle); intent.putExtra(ArticleModel.COLUMN_SAVED, this.saved); } }
Article implements DatabaseModel { public void putIntoIntent(Intent intent) { intent.putExtra(ArticleModel.COLUMN_ID, this.id); intent.putExtra(ArticleModel.COLUMN_ALIAS, this.alias); intent.putExtra(ArticleModel.COLUMN_URL, this.url); intent.putExtra(ArticleModel.COLUMN_TITLE, this.title); intent.putExtra(ArticleModel.COLUMN_DESCRIPTION, this.description); intent.putExtra(ArticleModel.COLUMN_IMAGE, this.image); intent.putExtra(ContentModel.COLUMN_CONTENT, this.content); intent.putExtra(ArticleModel.COLUMN_AUTHOR, this.author); intent.putExtra(ArticleModel.COLUMN_SOURCE, this.source); intent.putExtra(ArticleModel.COLUMN_DOMAIN, this.domain); intent.putExtra(ArticleModel.COLUMN_DURATION, this.duration); intent.putExtra(ArticleModel.COLUMN_INSERTED_AT, this.insertedAt); intent.putExtra(ArticleModel.COLUMN_IS_ARTICLE, this.isArticle); intent.putExtra(ArticleModel.COLUMN_SAVED, this.saved); } Article();  Article(Cursor cursor);  Article(Intent intent); }
Article implements DatabaseModel { public void putIntoIntent(Intent intent) { intent.putExtra(ArticleModel.COLUMN_ID, this.id); intent.putExtra(ArticleModel.COLUMN_ALIAS, this.alias); intent.putExtra(ArticleModel.COLUMN_URL, this.url); intent.putExtra(ArticleModel.COLUMN_TITLE, this.title); intent.putExtra(ArticleModel.COLUMN_DESCRIPTION, this.description); intent.putExtra(ArticleModel.COLUMN_IMAGE, this.image); intent.putExtra(ContentModel.COLUMN_CONTENT, this.content); intent.putExtra(ArticleModel.COLUMN_AUTHOR, this.author); intent.putExtra(ArticleModel.COLUMN_SOURCE, this.source); intent.putExtra(ArticleModel.COLUMN_DOMAIN, this.domain); intent.putExtra(ArticleModel.COLUMN_DURATION, this.duration); intent.putExtra(ArticleModel.COLUMN_INSERTED_AT, this.insertedAt); intent.putExtra(ArticleModel.COLUMN_IS_ARTICLE, this.isArticle); intent.putExtra(ArticleModel.COLUMN_SAVED, this.saved); } Article();  Article(Cursor cursor);  Article(Intent intent); @Override void fillFromCursor(Cursor cursor); void fillFromIntent(Intent intent); void putIntoIntent(Intent intent); }
Article implements DatabaseModel { public void putIntoIntent(Intent intent) { intent.putExtra(ArticleModel.COLUMN_ID, this.id); intent.putExtra(ArticleModel.COLUMN_ALIAS, this.alias); intent.putExtra(ArticleModel.COLUMN_URL, this.url); intent.putExtra(ArticleModel.COLUMN_TITLE, this.title); intent.putExtra(ArticleModel.COLUMN_DESCRIPTION, this.description); intent.putExtra(ArticleModel.COLUMN_IMAGE, this.image); intent.putExtra(ContentModel.COLUMN_CONTENT, this.content); intent.putExtra(ArticleModel.COLUMN_AUTHOR, this.author); intent.putExtra(ArticleModel.COLUMN_SOURCE, this.source); intent.putExtra(ArticleModel.COLUMN_DOMAIN, this.domain); intent.putExtra(ArticleModel.COLUMN_DURATION, this.duration); intent.putExtra(ArticleModel.COLUMN_INSERTED_AT, this.insertedAt); intent.putExtra(ArticleModel.COLUMN_IS_ARTICLE, this.isArticle); intent.putExtra(ArticleModel.COLUMN_SAVED, this.saved); } Article();  Article(Cursor cursor);  Article(Intent intent); @Override void fillFromCursor(Cursor cursor); void fillFromIntent(Intent intent); void putIntoIntent(Intent intent); public long id; public String alias; public String url; public String title; public String description; public String image; public String content; public String author; public String source; public String domain; public int duration; public long insertedAt; public boolean isArticle; public boolean saved; public Long sourceId; public String sourceModelName; public String sourceModelImageUrl; }