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

import org.junit.Test;

import static org.junit.Assert.*;

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

  @Test
  public void setFirstPhoneNumber() {
    MobileAuthBean bean = new MobileAuthBean();
    bean.setFirstPhoneNumber("010");

    assertEquals("010", bean.getFirstPhoneNumber());
    assertEquals("", bean.getName());
    assertEquals("", bean.getNationality());
    assertEquals("", bean.getBirthDate());
    assertEquals("", bean.getGender());
    assertEquals("", bean.getMobileCompany());
    assertEquals("", bean.getPhoneNumber());
    assertEquals(false, bean.getAgreeList().get(0));
    assertEquals(false, bean.getAgreeList().get(1));
    assertEquals(false, bean.getAgreeList().get(2));
    assertEquals(false, bean.getAgreeList().get(3));
  }

  @Test
  public void setName() {
    MobileAuthBean bean = new MobileAuthBean();
    bean.setName("name");

    assertEquals("", bean.getFirstPhoneNumber());
    assertEquals("name", bean.getName());
    assertEquals("", bean.getNationality());
    assertEquals("", bean.getBirthDate());
    assertEquals("", bean.getGender());
    assertEquals("", bean.getMobileCompany());
    assertEquals("", bean.getPhoneNumber());
    assertEquals(false, bean.getAgreeList().get(0));
    assertEquals(false, bean.getAgreeList().get(1));
    assertEquals(false, bean.getAgreeList().get(2));
    assertEquals(false, bean.getAgreeList().get(3));
  }

  @Test
  public void setNationality() {
    MobileAuthBean bean = new MobileAuthBean();
    bean.setNationality(MobileAuthBean.NATIONALITY_DOMESTIC);

    assertEquals("", bean.getFirstPhoneNumber());
    assertEquals("", bean.getName());
    assertEquals(MobileAuthBean.NATIONALITY_DOMESTIC, bean.getNationality());
    assertEquals("", bean.getBirthDate());
    assertEquals("", bean.getGender());
    assertEquals("", bean.getMobileCompany());
    assertEquals("", bean.getPhoneNumber());
    assertEquals(false, bean.getAgreeList().get(0));
    assertEquals(false, bean.getAgreeList().get(1));
    assertEquals(false, bean.getAgreeList().get(2));
    assertEquals(false, bean.getAgreeList().get(3));
  }

  @Test
  public void setBirthDate() {
    MobileAuthBean bean = new MobileAuthBean();
    bean.setBirthDate("19990909");

    assertEquals("", bean.getFirstPhoneNumber());
    assertEquals("", bean.getName());
    assertEquals("", bean.getNationality());
    assertEquals("19990909", bean.getBirthDate());
    assertEquals("", bean.getGender());
    assertEquals("", bean.getMobileCompany());
    assertEquals("", bean.getPhoneNumber());
    assertEquals(false, bean.getAgreeList().get(0));
    assertEquals(false, bean.getAgreeList().get(1));
    assertEquals(false, bean.getAgreeList().get(2));
    assertEquals(false, bean.getAgreeList().get(3));
  }

  @Test
  public void setGender() {
    MobileAuthBean bean = new MobileAuthBean();
    bean.setGender(MobileAuthBean.GENDER_FEMALE);

    assertEquals("", bean.getFirstPhoneNumber());
    assertEquals("", bean.getName());
    assertEquals("", bean.getNationality());
    assertEquals("", bean.getBirthDate());
    assertEquals(MobileAuthBean.GENDER_FEMALE, bean.getGender());
    assertEquals("", bean.getMobileCompany());
    assertEquals("", bean.getPhoneNumber());
    assertEquals(false, bean.getAgreeList().get(0));
    assertEquals(false, bean.getAgreeList().get(1));
    assertEquals(false, bean.getAgreeList().get(2));
    assertEquals(false, bean.getAgreeList().get(3));
  }

  @Test
  public void setMobileCompany() {
    MobileAuthBean bean = new MobileAuthBean();
    bean.setMobileCompany("LGT");

    assertEquals("", bean.getFirstPhoneNumber());
    assertEquals("", bean.getName());
    assertEquals("", bean.getNationality());
    assertEquals("", bean.getBirthDate());
    assertEquals("", bean.getGender());
    assertEquals("LGT", bean.getMobileCompany());
    assertEquals("", bean.getPhoneNumber());
    assertEquals(false, bean.getAgreeList().get(0));
    assertEquals(false, bean.getAgreeList().get(1));
    assertEquals(false, bean.getAgreeList().get(2));
    assertEquals(false, bean.getAgreeList().get(3));
  }

  @Test
  public void setPhoneNumber() {
    MobileAuthBean bean = new MobileAuthBean();
    bean.setPhoneNumber("22228888");

    assertEquals("", bean.getFirstPhoneNumber());
    assertEquals("", bean.getNationality());
    assertEquals("", bean.getName());
    assertEquals("", bean.getBirthDate());
    assertEquals("", bean.getGender());
    assertEquals("", bean.getMobileCompany());
    assertEquals("22228888", bean.getPhoneNumber());
    assertEquals(false, bean.getAgreeList().get(0));
    assertEquals(false, bean.getAgreeList().get(1));
    assertEquals(false, bean.getAgreeList().get(2));
    assertEquals(false, bean.getAgreeList().get(3));
  }

  @Test
  public void setAgree() {
    MobileAuthBean bean = new MobileAuthBean();
    bean.setAgree(2, true);

    assertEquals("", bean.getFirstPhoneNumber());
    assertEquals("", bean.getName());
    assertEquals("", bean.getBirthDate());
    assertEquals("", bean.getGender());
    assertEquals("", bean.getMobileCompany());
    assertEquals("", bean.getPhoneNumber());
    assertEquals(false, bean.getAgreeList().get(0));
    assertEquals(false, bean.getAgreeList().get(1));
    assertEquals(true, bean.getAgreeList().get(2));
    assertEquals(false, bean.getAgreeList().get(3));
  }
}