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

import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.assertEquals;

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

  @Test
  public void addBean() {
    PolicyConfirmRequestBean bean = new PolicyConfirmRequestBean();
    List<PolicyVersionBean> list = bean.getPolicyList();

    assertEquals(0, list.size());

    bean.addBean(new PolicyVersionBean(0, 0));

    assertEquals(1, list.size());
  }

  @Test
  public void setPolicyList() {
    ArrayList<PolicyVersionBean> list = new ArrayList<>();
    list.add(new PolicyVersionBean(0, 0));
    list.add(new PolicyVersionBean(1, 1));

    PolicyConfirmRequestBean bean = new PolicyConfirmRequestBean();

    assertEquals(0, bean.getPolicyList().size());

    bean.setPolicyList(list);

    assertEquals(2, bean.getPolicyList().size());
  }
}