package kr.co.zumo.app.lifeplus.bean;

import org.junit.Test;

import kr.co.zumo.app.R;

import static junit.framework.Assert.assertEquals;

/**
 * SignUpBenefitBeanTest
 * <pre>
 * </pre>
 *
 * @author 민효동
 * @version 1.0
 * @history 민효동   [2018. 9. 12.]   [최초 작성]
 * @since 2018. 9. 12.
 */
public class SignUpBenefitBeanTest {

  @Test
  public void setImageResource() {
    SignUpBenefitBean bean = new SignUpBenefitBean("혜택", R.drawable.circle_full, "benefit", "category");

    assertEquals("혜택", bean.getText());
    assertEquals(R.drawable.circle_full, bean.getImageResource());
    assertEquals("benefit", bean.getBenefitText());
    assertEquals("category", bean.getCategoryText());

    bean.setImageResource(R.drawable.common_full_open_on_phone);
    bean.setBenefitText("new benefit");
    bean.setCategoryText("new category");
    assertEquals(R.drawable.common_full_open_on_phone, bean.getImageResource());
    assertEquals("new benefit", bean.getBenefitText());
    assertEquals("new category", bean.getCategoryText());
  }
}