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

import org.junit.Test;

import static org.junit.Assert.*;

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

  @Test
  public void constructor() {

    BannerBean bean = new BannerBean(1, "title", "description");

    assertEquals(1, bean.getId());
    assertEquals("title", bean.getTitle());
    assertEquals("description", bean.getDescription());
  }

  @Test
  public void setId() {
    BannerBean bean = new BannerBean();
    bean.setId(2);

    assertEquals(2, bean.getId());
    assertEquals(null, bean.getTitle());
    assertEquals(null, bean.getDescription());
  }

  @Test
  public void setTitle() {
    BannerBean bean = new BannerBean();
    bean.setTitle("제목");

    assertEquals(0, bean.getId());
    assertEquals("제목", bean.getTitle());
    assertEquals(null, bean.getDescription());
  }

  @Test
  public void setDescription() {
    BannerBean bean = new BannerBean();
    bean.setDescription("내용");

    assertEquals(0, bean.getId());
    assertEquals(null, bean.getTitle());
    assertEquals("내용", bean.getDescription());
  }
}