use of com.amazon.android.model.content.Content in project zype-firebuilder by zype.
the class ContentTranslatorTest method testValidateModelFalseUrl.
/**
* Tests the {@link ContentTranslator#validateModel(Content)} method for the false case where
* the url is invalid.
*/
@Test
public void testValidateModelFalseUrl() throws Exception {
Content content = createValidContent();
// make good content bad
content.setUrl("");
assertFalse(mContentTranslator.validateModel(content));
}
use of com.amazon.android.model.content.Content in project zype-firebuilder by zype.
the class ContentTranslatorTest method testSetMemberVariableCardImageUrl.
/**
* Tests the {@link ContentTranslator#setMemberVariable(Content, String, Object)} method for
* the cardImageUrl member variable.
*/
@Test
public void testSetMemberVariableCardImageUrl() throws Exception {
String urlText = "www.someUrl.com";
Content content = new Content();
assertTrue(mContentTranslator.setMemberVariable(content, "mCardImageUrl", urlText));
assertEquals(content.getCardImageUrl(), urlText);
}
use of com.amazon.android.model.content.Content in project zype-firebuilder by zype.
the class ContentTranslatorTest method testSetMemberVariableSubtitle.
/**
* Tests the {@link ContentTranslator#setMemberVariable(Content, String, Object)} method for
* the subtitle member variable.
*/
@Test
public void testSetMemberVariableSubtitle() throws Exception {
String subtitleText = "A subtitle";
Content content = new Content();
assertTrue(mContentTranslator.setMemberVariable(content, "mSubtitle", subtitleText));
assertEquals(content.getSubtitle(), subtitleText);
}
use of com.amazon.android.model.content.Content in project zype-firebuilder by zype.
the class ContentTranslatorTest method testSetMemberVariableBackgroundImageUrl.
/**
* Tests the {@link ContentTranslator#setMemberVariable(Content, String, Object)} method for
* the backgroundImageUrl member variable.
*/
@Test
public void testSetMemberVariableBackgroundImageUrl() throws Exception {
String urlText = "www.someUrl.com";
Content content = new Content();
assertTrue(mContentTranslator.setMemberVariable(content, "mBackgroundImageUrl", urlText));
assertEquals(content.getBackgroundImageUrl(), urlText);
}
use of com.amazon.android.model.content.Content in project zype-firebuilder by zype.
the class ContentTranslatorTest method testSetMemberVariableId.
/**
* Tests the {@link ContentTranslator#setMemberVariable(Content, String, Object)} method for
* the id member variable.
*/
@Test
public void testSetMemberVariableId() throws Exception {
Content content = new Content();
assertTrue(mContentTranslator.setMemberVariable(content, "mId", "1"));
assertEquals(content.getId(), "1");
}
Aggregations